SnappyUnsafeBytesExtension extension

Snappy operations on blit's external-memory UnsafeBytes handles.

Every method takes the byte length explicitly because an UnsafeBytes handle stores only an address.

on
  • UnsafeBytes

Methods

snappyCompress(int length, {int level = 1}) → SnappyMemory

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

Compresses length bytes of this memory into a new external allocation.
snappyCompressInto(int length, UnsafeBytes destination, int destinationLength, {int level = 1}) → int

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

Compresses length bytes of this memory into destination.
snappyDecompress(int length) → SnappyMemory

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

Decompresses the block stream of length bytes into new external memory.
snappyDecompressInto(int length, UnsafeBytes destination, int destinationLength) → int

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

Decompresses the block stream of length bytes into destination.
snappyFrameCompress(int length, {int level = 1}) → SnappyMemory

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

Frames length bytes of this memory into a new external allocation.
snappyFrameCompressInto(int length, UnsafeBytes destination, int destinationLength, {int level = 1}) → int

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

Frames length bytes of this memory into destination.
snappyFrameDecompress(int length, {bool verifyChecksums = true}) → SnappyMemory

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

Decompresses the framed stream of length bytes into new external memory.
snappyFrameDecompressInto(int length, UnsafeBytes destination, int destinationLength, {bool verifyChecksums = true}) → int

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

Decompresses the framed stream of length bytes into destination.
snappyUncompressedLength(int length) → int

Available on UnsafeBytes, provided by the SnappyUnsafeBytesExtension extension

The uncompressed length declared by the block stream in this memory.