The simple API is designed for one-shot compression and decompression of byte arrays, mirroring the lz4 API. You can provide a pre-allocated destination buffer to dst to minimize allocations. If dst is nil, the functions will allocate the necessary space.
// Compress compresses src into dst. If dst is nil, it allocates the worst case size.
// If dst is too small, it will be reallocated and returned.
Compress(dst, src []byte) ([]byte, error)
// CompressLevel is the same as Compress but allows specifying a compression level.
CompressLevel(dst, src []byte, level int) ([]byte, error)
// Decompress decompresses src into dst. If dst is nil, it allocates 4*src as default.
// If dst is too small, it retries up to 3 times by doubling the size before
// switching to the slower stream API.
Decompress(dst, src []byte) ([]byte, error)