Skip to main content

lib_compression/
assembler.rs

1//! JIT assembler for shards
2
3/// Assembles shards back into original data.
4pub struct JitAssembler;
5
6impl JitAssembler {
7    pub fn new() -> Self {
8        JitAssembler
9    }
10
11    /// Assemble shards into original data.
12    pub fn assemble(&self, shards: &[Vec<u8>]) -> crate::Result<Vec<u8>> {
13        // Stub: concatenate
14        Ok(shards.iter().flatten().cloned().collect())
15    }
16}
17
18impl Default for JitAssembler {
19    fn default() -> Self {
20        Self::new()
21    }
22}