tinyquant-io 0.0.0

Serialization, mmap, and file I/O for TinyQuant.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
//! Opaque metadata blob view.

/// Opaque metadata bytes from a Level-2 TQCV header.
pub struct MetadataBlob<'a> {
    bytes: &'a [u8],
}

impl<'a> MetadataBlob<'a> {
    /// Wrap a slice as a metadata blob.
    pub const fn new(bytes: &'a [u8]) -> Self {
        Self { bytes }
    }

    /// Return the raw bytes.
    pub const fn as_bytes(&self) -> &[u8] {
        self.bytes
    }
}