class

ZipTricks::CRC32Writer

Inherits IO < Reference < Object

Constructors

new(io : IO)
Source

Instance methods

count
Source
crc32
Source
read(slice : Bytes)

Does nothing but must be implemented since Crystal does not differentiate between Writesr/Readers

Source
write(slice : Bytes) : Nil

Writes the contents of slice into this IO.

io = IO::Memory.new
slice = Bytes.new(4) { |i| ('a'.ord + i).to_u8 }
io.write(slice)
io.to_s # => "abcd"
Source