Enables or disables compression for all chunks. When compression is enabled, the library will use the default compression algorithm to reduce the size of serialized chunks. The actual algorithm used depends on which features are enabled: - If the `lz4_flex` feature is enabled: LZ4 compression (fast, moderate ratio) - Otherwise: No compression (pass-through) ## Parameters - `enable`: Whether to
(mut self, enable: bool)
| 286 | /// with minimal CPU overhead. For data that doesn't compress well (e.g., already |
| 287 | /// compressed images), the overhead may outweigh the benefits. |
| 288 | pub fn compression(mut self, enable: bool) -> Self { |
| 289 | self.use_compression = enable; |
| 290 | self |
| 291 | } |
| 292 | |
| 293 | /// Serializes an object graph to disk with the configured settings. |
| 294 | /// |
no outgoing calls