class

Zstd::Compress::Context

Inherits Zstd::Context / Reference / Object

Usage:

cctx = Zstd::Compress::Context.new
buf = Bytes.new 22
cbuf = cctx.compress buf

Constructors

new(level : Int32 = LEVEL_DEFAULT, *, dict : Zstd::Dict | Nil = nil)
Source

Instance methods

checksum=(value : Bool) : Bool
Source
checksum?
Source
compress(src : Bytes, dst : Bytes = Bytes.new(compress_bound(src.bytesize))) : Bytes
Source
compress_bound(size)

Maximum output buffer size for compression

Source
dict
Source
dict=(d : Zstd::Dict)

Overrides compression level.

Source
level
Source
level=(val)
Source
memsize

Give the current memory usage of zstd context.

Note that object memory usage can evolve (increase or decrease) over time.

Source
threads
Source
threads=(val)
Source

Nested types