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