Expected behavior: write should always return the number of bytes written.
Actual behavior: write returns the value written, but only if the value is a UInt8.
To reproduce:
using GZip
touch("test.gz")
GZip.open("test.gz", "w") do io
write(io, 10)
end # Returns 8 as expected, since Int64 has 8 bytes.
GZip.open("test.gz", "w") do io
write(io, 0xa)
end # Returns 10, but should return 1, since UInt8 has 1 byte.
Expected behavior:
write
should always return the number of bytes written. Actual behavior:write
returns the value written, but only if the value is aUInt8
. To reproduce: