---
title: COMPRESSION_LZBITMAP
framework: compression
role: symbol
role_heading: Global Variable
path: compression/compression_lzbitmap
---

# COMPRESSION_LZBITMAP

The LZBITMAP compression algorithm, which is designed to exploit the vector instruction set of current CPUs.

## Declaration

```swift
var COMPRESSION_LZBITMAP: compression_algorithm { get }
```

## Discussion

Discussion LZBITMAP is the Apple compression algorithm designed around the SIMD vector instruction set found on modern CPUs. Its encoding scheme arranges literal and match data so that both encoder and decoder hot loops can advance multiple symbols per vector operation, which delivers substantially higher throughput than scalar LZ-family codecs at comparable compression ratios. LZBITMAP sits between COMPRESSION_LZ4 and COMPRESSION_LZMESH in the speed-ratio tradeoff. It achieves compression ratios close to COMPRESSION_ZLIB at a lower compression cost. When compression ratio and performance are equally important, prefer COMPRESSION_LZMESH to favor ratio and LZBITMAP to favor decoder performance. If raw encoder speed matters more than ratio, use COMPRESSION_LZ4 instead. LZBITMAP is available only on Apple devices, so don’t use it for payloads that need to be decoded on non-Apple platforms. For cross-platform interoperability, use COMPRESSION_ZLIB or COMPRESSION_LZ4 instead. LZBITMAP is available through the buffer API only — compression_encode_buffer(_:_:_:_:_:_:) and compression_decode_buffer(_:_:_:_:_:_:). important: The Compression stream API doesn’t support the LZBITMAP compression algorithm. Use COMPRESSION_LZFSE or COMPRESSION_ZLIB if you need streaming behavior, such as compressing data as it arrives over the network or processing files larger than available memory.

## See Also

### Algorithm Constants

- [COMPRESSION_LZFSE](compression/compression_lzfse.md)
- [COMPRESSION_LZ4](compression/compression_lz4.md)
- [COMPRESSION_LZ4_RAW](compression/compression_lz4_raw.md)
- [COMPRESSION_LZMA](compression/compression_lzma.md)
- [COMPRESSION_ZLIB](compression/compression_zlib.md)
- [COMPRESSION_BROTLI](compression/compression_brotli.md)
- [COMPRESSION_LZMESH](compression/compression_lzmesh.md)
- [COMPRESSION_LZRAVEN](compression/compression_lzraven.md)
