SChunk#
The basic compressed data container (aka super-chunk). This class consists of a set of useful parameters and methods that allow not only to create compressed data, and decompress it, but also to manage the data in a more sophisticated way. For example, it is possible to append new data, update existing data, delete data, etc.
Methods#
Create a new super-chunk, or open an existing one. |
|
Append a data buffer to the SChunk. |
|
Decompress the chunk given by its index |
|
Delete the specified chunk from the SChunk. |
|
Return the compressed chunk that is in the SChunk. |
|
Insert an already compressed chunk into the SChunk. |
|
Insert the data in the specified position in the SChunk. |
|
Iterate over the |
|
Iterate over the chunks of the SChunk, providing info on index and special values. |
|
Fill the SChunk with a special value. |
|
Update an existing chunk in the SChunk. |
|
Update the chunk in the specified position with the given data. |
|
Get a slice from |
|
Get a slice from the SChunk. |
|
Set slice to |
|
Return the number of items in the SChunk. |
|
Get a bytes object containing the serialized SChunk instance. |
|
Decorator to set a function as a postfilter. |
|
Remove the postfilter from the SChunk instance. |
|
Decorator to set a filler function. |
|
Decorator to set a function as a prefilter. |
|
Remove the prefilter from the SChunk instance. |
Attributes#
The block size (in bytes). |
|
Amount of compressed data bytes (data size + chunk headers size). |
|
Number of elements per chunk. |
|
Number of bytes in each chunk. |
|
Whether the SChunk is stored contiguously or sparsely. |
|
|
|
Compression ratio. |
|
|
|
Access to the fixed-length metadata of the SChunk. |
|
Amount of uncompressed data bytes. |
|
Type size of the SChunk. |
|
Path where the SChunk is stored. |
|
Access to the variable-length metadata of the SChunk. |
Functions#
|
Create a SChunk instance from a contiguous frame buffer. |