Skip to content

roshii/BitConverter.jl

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

9 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

BitConverter.jl

Converts base data types to an array of bytes, and an array of bytes to base data types. So far Integer only are implemented.

pipeline status coverage report

Examples

julia> bytes(big(2)^32)
5-element Array{UInt8,1}:
 0x01
 0x00
 0x00
 0x00
 0x00
julia> to_big(rand(UInt8, 8))
15240817377628901573

julia> to_int(rand(UInt8, 2))
48868

julia> to_int(rand(UInt8, 8))
-3411029373876830527

Documentation

https://braneproject.gitlab.io/BitConverter.jl

Buy me a cup of coffee

Donate Bitcoin