-
-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Closed
Description
b = falses(1)
file = tempname()
open(file,"w") do f
write(f,b)
end
filesize(file) == 8So the length of the original BitArray is lost in I/O.
Not sure we can really do anything about this since we can't (I think) write a single bit to a file, but this can be a bit surprising.
I wonder though if this calls for a Bit type that would be the eltype(::BitArray). That would at least allow you to do
b = read(io, Bit, 1)I'm pretty sure this has been discussed elsewhere, so I'll try to dig around to see what was or if there was anything concluded. Feel free to close if this is old news.
Metadata
Metadata
Assignees
Labels
No labels