A write-only IO
object to compress data in the DEFLATE format.
Instances of this class wrap another IO object. When you write to this instance, it compresses the data and writes it to the underlying IO.
NOTE unless created with a block, #close
must be invoked after all data has been written to a Flate::Writer instance.
Creates an instance of Flate::Writer.
Creates a new writer for the given io, yields it to the given block, and closes it at its end.
Closes this writer.
Returns true
if this IO is closed.
See IO#flush
.
If #sync_close?
is true
, closing this IO will close the underlying IO.
If #sync_close?
is true
, closing this IO will close the underlying IO.
See IO#write
.
IO
IO
Reference
Reference
Object
Object
Creates an instance of Flate::Writer. #close
must be invoked after all data has written.
Creates a new writer for the given io, yields it to the given block, and closes it at its end.
Closes this writer. Must be invoked after all data has been written.
If #sync_close?
is true
, closing this IO will close the underlying IO.
If #sync_close?
is true
, closing this IO will close the underlying IO.
© 2012–2020 Manas Technology Solutions.
Licensed under the Apache License, Version 2.0.
https://crystal-lang.org/api/0.35.1/Compress/Deflate/Writer.html