Crate sp_maybe_compressed_blob

Crate sp_maybe_compressed_blob 

Source
Expand description

Handling of blobs that may be compressed, based on an 8-byte magic identifier at the head.

Enums§

Error
A possible bomb was encountered.

Constants§

CODE_BLOB_BOMB_LIMIT
A recommendation for the bomb limit for code blobs.

Functions§

compressDeprecated
Compress a blob who’s size is limited by bomb_limit.
compress_strongly
Strongly compress a blob who’s size is limited by bomb_limit.
compress_weakly
Weakly compress a blob who’s size is limited by bomb_limit.
decompress
Decode a blob, if it indicates that it is compressed. Provide a bomb_limit, which is the limit of bytes which should be decompressed from the blob.