accidentally not in module
parent
8665fd5bb4
commit
32b806200d
|
@ -35,8 +35,6 @@ function bit_at(byte::UInt8, idx::Int64; t::Type=Int64)::Int64
|
|||
parse(t, bitstring(byte)[idx])
|
||||
end
|
||||
|
||||
end
|
||||
# byte_vec_to_string(UInt8.(collect("ABC")))
|
||||
|
||||
function bit_vector(byte::UInt8; little_endian=false)::Vector{UInt8}
|
||||
range = if little_endian
|
||||
|
@ -53,4 +51,7 @@ end
|
|||
function bit_vector(byte_vector::Vector{UInt8}; little_endian=false)::Vector{UInt8}
|
||||
vecs = [bit_vector(byte; little_endian=little_endian) for byte ∈ byte_vector]
|
||||
reduce(vcat, vecs)
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
# byte_vec_to_string(UInt8.(collect("ABC")))
|
||||
|
|
Loading…
Reference in New Issue