[][src]Function bpack::pack

pub fn pack(src: &[u8]) -> Option<Vec<u8>>

Compresses byte slice

Examples

use bpack::pack;

let data = "some very long string".as_bytes();

let opt = pack(data);

Panics

  1. if byte in byte slice is not in the range 32..127
  2. if data size is not in the range ~2000 to 65535 bytes