qdrant-edge 0.7.1

A lightweight, in-process vector search engine designed for embedded devices, autonomous systems, and mobile agents.
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
use std::io::{Result, Write};

pub static ZEROS: [u8; 8096] = [0u8; 8096];

pub trait WriteZerosExt {
    /// Write `len` zeros to the writer.
    fn write_zeros(&mut self, len: usize) -> Result<()>;
}

impl<W: Write> WriteZerosExt for W {
    fn write_zeros(&mut self, mut len: usize) -> Result<()> {
        while len > 0 {
            len -= self.write(&ZEROS[..ZEROS.len().min(len)])?;
        }
        Ok(())
    }
}