Skip to contents

Class representing a lzma compressor

Format

R6::R6Class inheriting from Codec.

Details

Lzma compressor for Zarr

Super class

pizzarr::Codec -> LzmaCodec

Public fields

level

The compression level.

format

The compression format.

Methods


Method new()

Create a new lzma compressor.

Usage

LzmaCodec$new(level = 9, format = 1, ...)

Arguments

level

The compression level, between 1 and 22.

format

(integer(1))
Only 1 is supported.

...

Not used.

Returns

A new LzmaCodec object.


Method encode()

Compress data.

Usage

LzmaCodec$encode(buf, zarr_arr)

Arguments

buf

(raw())
The un-compressed data.

zarr_arr

(ZarrArray)
The ZarrArray instance.

Returns

Compressed data.


Method decode()

Decompress data.

Usage

LzmaCodec$decode(buf, zarr_arr)

Arguments

buf

(raw())
The compressed data.

zarr_arr

(ZarrArray)
The ZarrArray instance.

Returns

Un-compressed data.


Method get_config()

Get codec configuration as a list.

Usage

LzmaCodec$get_config()

Returns

A named list.


Method clone()

The objects of this class are cloneable with this method.

Usage

LzmaCodec$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.