class Zstd::Dict

Defined in:

zstd/dict.cr

Constructors

Instance Method Summary

Constructor Detail

def self.new(buf : Bytes, level : Int32 = LEVEL_DEFAULT) #

Create a digested dictionary, ready to start compression or decompression operation without startup delay.

May be shared between multiple Context's.

buf is copied and may be reused or modified.


[View source]

Instance Method Detail

def cdict : Compress::Dict #

The compression dictionary.


[View source]
def ddict : Decompress::Dict #

The decompression dictionary.


[View source]
def dict_id #

[View source]
def memsize #

Sum of @buf.bytesize, compression and decompression dictionary sizes reported by Zstandard.

Doesn't include crystal object overhead which is probably less than 52 bytes.


[View source]