MCPcopy Create free account
hub / github.com/RetypeOS/parcode / new

Method new

src/compression.rs:355–368  ·  view source on GitHub ↗

Creates a new registry with default algorithms registered. ID 0: `NoCompression` ID 1: `Lz4Compressor` (if `lz4_flex` feature is enabled)

()

Source from the content-addressed store, hash-verified

353 /// * ID 0: `NoCompression`
354 /// * ID 1: `Lz4Compressor` (if `lz4_flex` feature is enabled)
355 pub fn new() -> Self {
356 let mut reg = Self {
357 algorithms: (0..8).map(|_| None).collect(),
358 };
359
360 // ID 0: NoCompression
361 reg.register(Box::new(NoCompression));
362
363 // ID 1: Lz4
364 #[cfg(feature = "lz4_flex")]
365 reg.register(Box::new(Lz4Compressor));
366
367 reg
368 }
369
370 /// Registers a new compressor.
371 ///

Callers

nothing calls this directly

Calls 1

registerMethod · 0.80

Tested by

no test coverage detected