Function sp_maybe_compressed_blob::compress [−][src]
pub fn compress(blob: &[u8], bomb_limit: usize) -> Option<Vec<u8>>
Expand description
Encode a blob as compressed. If the blob’s size is over the bomb limit, this will not compress the blob, as the decoder will not be able to be able to differentiate it from a compression bomb.