Skip to content

Truly independent web browser

LibCompress: Add a Rust crate for streaming compression

Shannon Booth6208632107fa
diff --git a/Cargo.lock b/Cargo.lock
index 7321288dca7..49b60e31a04 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -50,6 +50,21 @@ dependencies = [
name = "ak"
version = "0.1.0"
+[[package]]
+name = "alloc-no-stdlib"
+version = "3.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a"
+
+[[package]]
+name = "alloc-stdlib"
+version = "0.3.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1"
+dependencies = [
+ "alloc-no-stdlib",
+]
+
[[package]]
name = "allocator-api2"
version = "0.2.21"
@@ -145,6 +160,27 @@ dependencies = [
"serde_core",
]
+[[package]]
+name = "brotli"
+version = "9.0.0"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f8b851b75c23ca7873623d612fe49bd1989aeb03d08fb9432187eb253d3d4c6b"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+ "brotli-decompressor",
+]
+
+[[package]]
+name = "brotli-decompressor"
+version = "6.0.1"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "941cd9bd4ddab83cb46fa5a2d428f1c857b24ac78cb876cf7beb710840934bd7"
+dependencies = [
+ "alloc-no-stdlib",
+ "alloc-stdlib",
+]
+
[[package]]
name = "byteorder"
version = "1.5.0"
@@ -337,6 +373,15 @@ dependencies = [
"rustc_version",
]
+[[package]]
+name = "flate2"
+version = "1.1.10"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb"
+dependencies = [
+ "zlib-rs",
+]
+
[[package]]
name = "foldhash"
version = "0.1.5"
@@ -682,6 +727,14 @@ dependencies = [
"rustc-demangle",
]
+[[package]]
+name = "libcompress_rust"
+version = "0.1.0"
+dependencies = [
+ "brotli",
+ "flate2",
+]
+
[[package]]
name = "libgfx_rust"
version = "0.1.0"
@@ -1689,6 +1742,12 @@ dependencies = [
"syn 3.0.4",
]
+[[package]]
+name = "zlib-rs"
+version = "0.6.8"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112"
+
[[package]]
name = "zmij"
version = "1.0.21"
diff --git a/Cargo.toml b/Cargo.toml
index 3bcf48bfccc..bee09548595 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -2,6 +2,7 @@
members = [
"AK/Rust",
"Libraries/LibCompositing/Rust",
+ "Libraries/LibCompress/Rust",
"Libraries/LibGfx/Rust",
"Libraries/LibImageDecoders/Rust",
"Libraries/LibIPC/Rust",
diff --git a/Libraries/LibCompress/Rust/Cargo.toml b/Libraries/LibCompress/Rust/Cargo.toml
new file mode 100644
index 00000000000..ca9556fa081
--- /dev/null
+++ b/Libraries/LibCompress/Rust/Cargo.toml
@@ -0,0 +1,17 @@
+[package]
+name = "libcompress_rust"
+version = "0.1.0"
+edition = "2024"
+
+[lib]
+crate-type = ["rlib"]
+
+# After changing dependencies, regenerate the Flatpak sources:
+# python3 Meta/CMake/flatpak/generate-cargo-sources.py
+[dependencies]
+# NB: Without the ffi-api feature, which would export C functions named as libbrotli's, which LibCompress links.
+brotli = { version = "9.0.0", default-features = false, features = ["std"] }
+flate2 = { version = "1.1.10", default-features = false, features = ["zlib-rs"] }
+
+[lints]
+workspace = true
diff --git a/Libraries/LibCompress/Rust/src/compressor.rs b/Libraries/LibCompress/Rust/src/compressor.rs
new file mode 100644
index 00000000000..2b69a5152a9
--- /dev/null
+++ b/Libraries/LibCompress/Rust/src/compressor.rs
@@ -0,0 +1,94 @@
+/*
+ * Copyright (c) 2026-present, the Ladybird developers.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+use std::io::{self, Write};
+
+use brotli::CompressorWriter;
+use flate2::Compression;
+use flate2::write::{DeflateEncoder, GzEncoder, ZlibEncoder};
+
+use crate::Format;
+
+/// The size of the buffer that the brotli encoder compresses into before it writes to its output.
+const BROTLI_BUFFER_SIZE: usize = 4096;
+/// The quality and the window size that brotli uses by default.
+const BROTLI_QUALITY: u32 = 11;
+const BROTLI_WINDOW_BITS: u32 = 22;
+
+/// The encoder of a format, which writes what it compresses to a buffer that it keeps, until it finishes.
+enum Encoder {
+ Brotli(Box<CompressorWriter<Vec<u8>>>),
+ Zlib(ZlibEncoder<Vec<u8>>),
+ Deflate(DeflateEncoder<Vec<u8>>),
+ Gzip(GzEncoder<Vec<u8>>),
+ Finished,
+}
+
+/// Compresses data that arrives in pieces, giving what it has compressed after each one.
+pub struct Compressor {
+ encoder: Encoder,
+}
+
+impl Compressor {
+ pub fn new(format: Format) -> Self {
+ let encoder = match format {
+ Format::Brotli => Encoder::Brotli(Box::new(CompressorWriter::new(
+ Vec::new(),
+ BROTLI_BUFFER_SIZE,
+ BROTLI_QUALITY,
+ BROTLI_WINDOW_BITS,
+ ))),
+ Format::Zlib => Encoder::Zlib(ZlibEncoder::new(Vec::new(), Compression::default())),
+ Format::Deflate => Encoder::Deflate(DeflateEncoder::new(Vec::new(), Compression::default())),
+ Format::Gzip => Encoder::Gzip(GzEncoder::new(Vec::new(), Compression::default())),
+ };
+ Self { encoder }
+ }
+
+ /// Compresses the next bytes of the data, returning what the encoder output, which can be nothing.
+ ///
+ /// # Panics
+ ///
+ /// If the compressor has finished.
+ pub fn compress(&mut self, bytes: &[u8]) -> io::Result<Vec<u8>> {
+ let output = match &mut self.encoder {
+ Encoder::Brotli(encoder) => {
+ encoder.write_all(bytes)?;
+ encoder.get_mut()
+ }
+ Encoder::Zlib(encoder) => {
+ encoder.write_all(bytes)?;
+ encoder.get_mut()
+ }
+ Encoder::Deflate(encoder) => {
+ encoder.write_all(bytes)?;
+ encoder.get_mut()
+ }
+ Encoder::Gzip(encoder) => {
+ encoder.write_all(bytes)?;
+ encoder.get_mut()
+ }
+ Encoder::Finished => panic!("a compressor compresses nothing after it finishes"),
+ };
+ Ok(core::mem::take(output))
+ }
+
+ /// Finishes the compressed data, returning the rest of what the encoder output.
+ ///
+ /// # Panics
+ ///
+ /// If the compressor has finished.
+ pub fn finish(&mut self) -> io::Result<Vec<u8>> {
+ match core::mem::replace(&mut self.encoder, Encoder::Finished) {
+ // NB: The brotli encoder finishes the compressed data when it gives up its output.
+ Encoder::Brotli(encoder) => Ok(encoder.into_inner()),
+ Encoder::Zlib(encoder) => encoder.finish(),
+ Encoder::Deflate(encoder) => encoder.finish(),
+ Encoder::Gzip(encoder) => encoder.finish(),
+ Encoder::Finished => panic!("a compressor finishes once"),
+ }
+ }
+}
diff --git a/Libraries/LibCompress/Rust/src/decompressor.rs b/Libraries/LibCompress/Rust/src/decompressor.rs
new file mode 100644
index 00000000000..279e6418b23
--- /dev/null
+++ b/Libraries/LibCompress/Rust/src/decompressor.rs
@@ -0,0 +1,158 @@
+/*
+ * Copyright (c) 2026-present, the Ladybird developers.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+use core::fmt;
+
+use brotli::{BrotliDecompressStream, BrotliResult, BrotliState, HeapAlloc, HuffmanCode};
+use flate2::{Decompress, FlushDecompress, Status};
+
+use crate::Format;
+
+type BrotliDecoder = BrotliState<HeapAlloc<u8>, HeapAlloc<u32>, HeapAlloc<HuffmanCode>>;
+
+/// The decoder of a format.
+enum Decoder {
+ Brotli(Box<BrotliDecoder>),
+ // zlib, raw deflate and gzip, which zlib-rs decodes.
+ Flate(Decompress),
+}
+
+/// How much the output of a decoder grows by while it decompresses.
+const OUTPUT_GROWTH: usize = 16 * 1024;
+
+/// The window that gzip data is decoded with, the largest that the format allows.
+const GZIP_WINDOW_BITS: u8 = 15;
+
+/// What decompressing some input gave: the output, and how many bytes at the end of the input the decoder did not
+/// consume, which it leaves only once it has reached the end of the compressed data.
+pub struct Decompressed {
+ pub output: Vec<u8>,
+ pub unconsumed_input: usize,
+}
+
+/// The input is not data of the format, with the decoder's description of why.
+#[derive(Debug)]
+pub struct DecompressionFailed(String);
+
+impl fmt::Display for DecompressionFailed {
+ fn fmt(&self, formatter: &mut fmt::Formatter<'_>) -> fmt::Result {
+ formatter.write_str(&self.0)
+ }
+}
+
+/// Decompresses data that arrives in pieces, giving all that it can decompress of each one.
+pub struct Decompressor {
+ decoder: Decoder,
+ has_reached_end: bool,
+}
+
+impl Decompressor {
+ pub fn new(format: Format) -> Self {
+ let decoder = match format {
+ // NB: new_strict() decodes RFC 7932 brotli only, without its large window extension.
+ Format::Brotli => Decoder::Brotli(Box::new(BrotliDecoder::new_strict(
+ HeapAlloc::default(),
+ HeapAlloc::default(),
+ HeapAlloc::default(),
+ ))),
+ Format::Zlib => Decoder::Flate(Decompress::new(true)),
+ Format::Deflate => Decoder::Flate(Decompress::new(false)),
+ Format::Gzip => Decoder::Flate(Decompress::new_gzip(GZIP_WINDOW_BITS)),
+ };
+ Self {
+ decoder,
+ has_reached_end: false,
+ }
+ }
+
+ /// Whether the decoder has reached the end of the compressed data.
+ pub fn has_reached_end(&self) -> bool {
+ self.has_reached_end
+ }
+
+ /// Decompresses the next bytes of the data, giving all the output that the decoder can make of them and of what it
+ /// kept of the bytes before them. Bytes after the end of the compressed data are left unconsumed.
+ pub fn decompress(&mut self, input: &[u8]) -> Result<Decompressed, DecompressionFailed> {
+ let mut output = Vec::new();
+ let unconsumed = if self.has_reached_end {
+ input
+ } else {
+ match &mut self.decoder {
+ Decoder::Brotli(decoder) => decompress_brotli(decoder, input, &mut output, &mut self.has_reached_end)?,
+ Decoder::Flate(decoder) => decompress_flate(decoder, input, &mut output, &mut self.has_reached_end)?,
+ }
+ };
+ Ok(Decompressed {
+ output,
+ unconsumed_input: unconsumed.len(),
+ })
+ }
+}
+
+/// Returns the input that the decoder did not consume.
+fn decompress_brotli<'a>(
+ decoder: &mut BrotliDecoder,
+ input: &'a [u8],
+ output: &mut Vec<u8>,
+ has_reached_end: &mut bool,
+) -> Result<&'a [u8], DecompressionFailed> {
+ let mut available_in = input.len();
+ let mut input_offset = 0;
+ let mut total_out = 0;
+ loop {
+ let mut output_offset = output.len();
+ output.resize(output_offset + OUTPUT_GROWTH, 0);
+ let mut available_out = OUTPUT_GROWTH;
+ let result = BrotliDecompressStream(
+ &mut available_in,
+ &mut input_offset,
+ input,
+ &mut available_out,
+ &mut output_offset,
+ output,
+ &mut total_out,
+ decoder,
+ );
+ output.truncate(output_offset);
+ match result {
+ BrotliResult::NeedsMoreOutput => {}
+ BrotliResult::NeedsMoreInput => return Ok(&input[input_offset..]),
+ BrotliResult::ResultSuccess => {
+ *has_reached_end = true;
+ return Ok(&input[input_offset..]);
+ }
+ BrotliResult::ResultFailure => return Err(DecompressionFailed(format!("{:?}", decoder.error_code))),
+ }
+ }
+}
+
+/// Returns the input that the decoder did not consume.
+fn decompress_flate<'a>(
+ decoder: &mut Decompress,
+ mut input: &'a [u8],
+ output: &mut Vec<u8>,
+ has_reached_end: &mut bool,
+) -> Result<&'a [u8], DecompressionFailed> {
+ loop {
+ output.reserve(OUTPUT_GROWTH);
+ let total_in = decoder.total_in();
+ let status = decoder
+ .decompress_vec(input, output, FlushDecompress::None)
+ .map_err(|error| DecompressionFailed(error.to_string()))?;
+ let consumed = usize::try_from(decoder.total_in() - total_in).expect("the decoder consumed some of the input");
+ input = &input[consumed..];
+ match status {
+ Status::StreamEnd => {
+ *has_reached_end = true;
+ return Ok(input);
+ }
+ // NB: The decoder stops when it runs out of input or of room for its output, and fails to make progress
+ // with BufError, so it has given all it can of this input once it stops short of both.
+ Status::Ok if !input.is_empty() || output.len() == output.capacity() => {}
+ Status::Ok | Status::BufError => return Ok(input),
+ }
+ }
+}
diff --git a/Libraries/LibCompress/Rust/src/lib.rs b/Libraries/LibCompress/Rust/src/lib.rs
new file mode 100644
index 00000000000..e4df2596071
--- /dev/null
+++ b/Libraries/LibCompress/Rust/src/lib.rs
@@ -0,0 +1,29 @@
+/*
+ * Copyright (c) 2026-present, the Ladybird developers.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+//! Streaming compression and decompression of brotli, zlib, raw deflate and gzip data, with flate2 on zlib-rs and
+//! with brotli.
+
+mod compressor;
+mod decompressor;
+
+pub use compressor::Compressor;
+pub use decompressor::{Decompressed, DecompressionFailed, Decompressor};
+
+#[derive(Clone, Copy, Debug, PartialEq, Eq)]
+pub enum Format {
+ /// RFC 7932
+ Brotli,
+ /// RFC 1950
+ Zlib,
+ /// RFC 1951
+ Deflate,
+ /// RFC 1952
+ Gzip,
+}
+
+#[cfg(test)]
+mod tests;
diff --git a/Libraries/LibCompress/Rust/src/tests.rs b/Libraries/LibCompress/Rust/src/tests.rs
new file mode 100644
index 00000000000..1c06a7c2970
--- /dev/null
+++ b/Libraries/LibCompress/Rust/src/tests.rs
@@ -0,0 +1,130 @@
+/*
+ * Copyright (c) 2026-present, the Ladybird developers.
+ *
+ * SPDX-License-Identifier: BSD-2-Clause
+ */
+
+use crate::{Compressor, Decompressor, Format};
+
+const FORMATS: [Format; 4] = [Format::Brotli, Format::Zlib, Format::Deflate, Format::Gzip];
+
+fn compress(format: Format, data: &[u8]) -> Vec<u8> {
+ let mut compressor = Compressor::new(format);
+ let mut compressed = compressor.compress(data).unwrap();
+ compressed.extend(compressor.finish().unwrap());
+ compressed
+}
+
+fn sample_data() -> Vec<u8> {
+ (0..100_000u32).map(|i| (i % 251) as u8 ^ (i / 1000) as u8).collect()
+}
+
+#[test]
+fn round_trip_in_one_piece() {
+ let data = sample_data();
+ for format in FORMATS {
+ let mut decompressor = Decompressor::new(format);
+ let decompressed = decompressor.decompress(&compress(format, &data)).unwrap();
+ assert_eq!(decompressed.output, data, "{format:?}");
+ assert_eq!(decompressed.unconsumed_input, 0, "{format:?}");
+ assert!(decompressor.has_reached_end(), "{format:?}");
+ }
+}
+
+#[test]
+fn round_trip_in_pieces() {
+ let data = sample_data();
+ for format in FORMATS {
+ let mut compressor = Compressor::new(format);
+ let mut compressed = Vec::new();
+ for piece in data.chunks(777) {
+ compressed.extend(compressor.compress(piece).unwrap());
+ }
+ compressed.extend(compressor.finish().unwrap());
+
+ let mut decompressor = Decompressor::new(format);
+ let mut output = Vec::new();
+ for piece in compressed.chunks(13) {
+ let decompressed = decompressor.decompress(piece).unwrap();
+ assert_eq!(decompressed.unconsumed_input, 0, "{format:?}");
+ output.extend(decompressed.output);
+ }
+ assert_eq!(output, data, "{format:?}");
+ assert!(decompressor.has_reached_end(), "{format:?}");
+ }
+}
+
+#[test]
+fn gives_all_the_output_of_each_piece() {
+ let data = vec![b'a'; 1_000_000];
+ for format in FORMATS {
+ let compressed = compress(format, &data);
+ let mut decompressor = Decompressor::new(format);
+ let decompressed = decompressor.decompress(&compressed).unwrap();
+ assert_eq!(decompressed.output.len(), data.len(), "{format:?}");
+ }
+}
+
+#[test]
+fn leaves_input_after_the_end_unconsumed() {
+ let data = b"Ladybird";
+ for format in FORMATS {
+ let mut compressed = compress(format, data);
+ compressed.extend([0, 1, 2]);
+
+ let mut decompressor = Decompressor::new(format);
+ let decompressed = decompressor.decompress(&compressed).unwrap();
+ assert_eq!(decompressed.output, data, "{format:?}");
+ assert_eq!(decompressed.unconsumed_input, 3, "{format:?}");
+ assert!(decompressor.has_reached_end(), "{format:?}");
+
+ let after_end = decompressor.decompress(&[3, 4]).unwrap();
+ assert!(after_end.output.is_empty(), "{format:?}");
+ assert_eq!(after_end.unconsumed_input, 2, "{format:?}");
+ }
+}
+
+#[test]
+fn does_not_reach_the_end_of_truncated_input() {
+ let data = sample_data();
+ for format in FORMATS {
+ let compressed = compress(format, &data);
+ let mut decompressor = Decompressor::new(format);
+ let decompressed = decompressor.decompress(&compressed[..compressed.len() - 1]).unwrap();
+ assert_eq!(decompressed.unconsumed_input, 0, "{format:?}");
+ assert!(!decompressor.has_reached_end(), "{format:?}");
+ }
+}
+
+#[test]
+fn fails_on_corrupt_input() {
+ for format in FORMATS {
+ let mut compressed = compress(format, &sample_data());
+ let middle = compressed.len() / 2;
+ compressed[middle] ^= 0xff;
+ compressed[middle + 1] ^= 0xff;
+
+ let mut decompressor = Decompressor::new(format);
+ assert!(decompressor.decompress(&compressed).is_err(), "{format:?}");
+ }
+}
+
+#[test]
+fn a_gzip_stream_has_one_member() {
+ let mut compressed = compress(Format::Gzip, b"one");
+ let second_member = compress(Format::Gzip, b"two");
+ compressed.extend(&second_member);
+
+ let mut decompressor = Decompressor::new(Format::Gzip);
+ let decompressed = decompressor.decompress(&compressed).unwrap();
+ assert_eq!(decompressed.output, b"one");
+ assert_eq!(decompressed.unconsumed_input, second_member.len());
+}
+
+#[test]
+fn rejects_brotli_large_window() {
+ // "Hello World", compressed with the large window extension and a window of 25 bits.
+ let compressed = [17, 25, 20, 0, 2, 72, 101, 108, 108, 111, 32, 87, 111, 114, 108, 100, 3];
+ let mut decompressor = Decompressor::new(Format::Brotli);
+ assert!(decompressor.decompress(&compressed).is_err());
+}
diff --git a/Meta/CMake/flatpak/cargo-sources.json b/Meta/CMake/flatpak/cargo-sources.json
index 0c000334fa1..1efc3d4893d 100644
--- a/Meta/CMake/flatpak/cargo-sources.json
+++ b/Meta/CMake/flatpak/cargo-sources.json
@@ -26,6 +26,20 @@
"sha256": "ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301",
"dest": "cargo/vendor/aho-corasick-1.1.4"
},
+ {
+ "type": "archive",
+ "archive-type": "tar-gzip",
+ "url": "https://static.crates.io/crates/alloc-no-stdlib/alloc-no-stdlib-3.0.0.crate",
+ "sha256": "c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a",
+ "dest": "cargo/vendor/alloc-no-stdlib-3.0.0"
+ },
+ {
+ "type": "archive",
+ "archive-type": "tar-gzip",
+ "url": "https://static.crates.io/crates/alloc-stdlib/alloc-stdlib-0.3.0.crate",
+ "sha256": "0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1",
+ "dest": "cargo/vendor/alloc-stdlib-0.3.0"
+ },
{
"type": "archive",
"archive-type": "tar-gzip",
@@ -110,6 +124,20 @@
"sha256": "843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af",
"dest": "cargo/vendor/bitflags-2.11.0"
},
+ {
+ "type": "archive",
+ "archive-type": "tar-gzip",
+ "url": "https://static.crates.io/crates/brotli/brotli-9.0.0.crate",
+ "sha256": "f8b851b75c23ca7873623d612fe49bd1989aeb03d08fb9432187eb253d3d4c6b",
+ "dest": "cargo/vendor/brotli-9.0.0"
+ },
+ {
+ "type": "archive",
+ "archive-type": "tar-gzip",
+ "url": "https://static.crates.io/crates/brotli-decompressor/brotli-decompressor-6.0.1.crate",
+ "sha256": "941cd9bd4ddab83cb46fa5a2d428f1c857b24ac78cb876cf7beb710840934bd7",
+ "dest": "cargo/vendor/brotli-decompressor-6.0.1"
+ },
{
"type": "archive",
"archive-type": "tar-gzip",
@@ -257,6 +285,13 @@
"sha256": "35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3",
"dest": "cargo/vendor/flatbuffers-25.12.19"
},
+ {
+ "type": "archive",
+ "archive-type": "tar-gzip",
+ "url": "https://static.crates.io/crates/flate2/flate2-1.1.10.crate",
+ "sha256": "6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb",
+ "dest": "cargo/vendor/flate2-1.1.10"
+ },
{
"type": "archive",
"archive-type": "tar-gzip",
@@ -1090,6 +1125,13 @@
"sha256": "34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da",
"dest": "cargo/vendor/zerovec-derive-0.11.6"
},
+ {
+ "type": "archive",
+ "archive-type": "tar-gzip",
+ "url": "https://static.crates.io/crates/zlib-rs/zlib-rs-0.6.8.crate",
+ "sha256": "b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112",
+ "dest": "cargo/vendor/zlib-rs-0.6.8"
+ },
{
"type": "archive",
"archive-type": "tar-gzip",
@@ -1103,6 +1145,8 @@
"echo '{\"files\": {}, \"package\": \"f44b96a666a23c12acad7c688bfe8638a7094e7eabe765b09a6864ab991c676d\"}' > cargo/vendor/adblock-0.13.3/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"a93b8a41dbe230ad5087cc721f8d41611de654542180586b315d9f4cf6b72bef\"}' > cargo/vendor/addr-0.15.6/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"ddd31a130427c27518df266943a5308ed92d4b226cc639f5a8f1002816174301\"}' > cargo/vendor/aho-corasick-1.1.4/.cargo-checksum.json",
+ "echo '{\"files\": {}, \"package\": \"c2fb6cfd47bf496ff64095c20eaba0c201404ee38714d4142fcfa1dc334fcc7a\"}' > cargo/vendor/alloc-no-stdlib-3.0.0/.cargo-checksum.json",
+ "echo '{\"files\": {}, \"package\": \"0b5c1865780388bfa186411ab5f247819487fc4864c6e9c3106611fa347586e1\"}' > cargo/vendor/alloc-stdlib-0.3.0/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"683d7910e743518b0e34f1186f92494becacb047c7b6bf616c96772180fef923\"}' > cargo/vendor/allocator-api2-0.2.21/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"824a212faf96e9acacdbd09febd34438f8f711fb84e09a8916013cd7815ca28d\"}' > cargo/vendor/anstream-1.0.0/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"940b3a0ca603d1eade50a4846a2afffd5ef57a9feac2c0e2ec2e14f9ead76000\"}' > cargo/vendor/anstyle-1.0.14/.cargo-checksum.json",
@@ -1115,6 +1159,8 @@
"echo '{\"files\": {}, \"package\": \"c08606f8c3cbf4ce6ec8e28fb0014a2c086708fe954eaa885384a6165172e7e8\"}' > cargo/vendor/autocfg-1.5.0/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6\"}' > cargo/vendor/base64-0.22.1/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"843867be96c8daad0d758b57df9392b6d8d271134fce549de6ce169ff98a92af\"}' > cargo/vendor/bitflags-2.11.0/.cargo-checksum.json",
+ "echo '{\"files\": {}, \"package\": \"f8b851b75c23ca7873623d612fe49bd1989aeb03d08fb9432187eb253d3d4c6b\"}' > cargo/vendor/brotli-9.0.0/.cargo-checksum.json",
+ "echo '{\"files\": {}, \"package\": \"941cd9bd4ddab83cb46fa5a2d428f1c857b24ac78cb876cf7beb710840934bd7\"}' > cargo/vendor/brotli-decompressor-6.0.1/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b\"}' > cargo/vendor/byteorder-1.5.0/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"5abbd6eeda6885048d357edc66748eea6e0268e3dd11f326fff5bd248d779c26\"}' > cargo/vendor/calendrical_calculations-0.2.4/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"befbfd072a8e81c02f8c507aefce431fe5e7d051f83d48a23ffc9b9fe5a11799\"}' > cargo/vendor/cbindgen-0.29.2/.cargo-checksum.json",
@@ -1136,6 +1182,7 @@
"echo '{\"files\": {}, \"package\": \"a043dc74da1e37d6afe657061213aa6f425f855399a11d3463c6ecccc4dfda1f\"}' > cargo/vendor/fastrand-2.4.0/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"aedcfb3409746eddb02b9e19ebda1c3394f759a152e48ee875a0844d1b955484\"}' > cargo/vendor/find-msvc-tools-0.1.14/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"35f6839d7b3b98adde531effaf34f0c2badc6f4735d26fe74709d8e513a96ef3\"}' > cargo/vendor/flatbuffers-25.12.19/.cargo-checksum.json",
+ "echo '{\"files\": {}, \"package\": \"6e634e2e0ebac1ee034020da1ca582e17ffe4e0f5e985823721e168928136dcb\"}' > cargo/vendor/flate2-1.1.10/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"d9c4f5dac5e15c24eb999c26181a6ca40b39fe946cbe4c263c7209467bc83af2\"}' > cargo/vendor/foldhash-0.1.5/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"77ce24cb58228fbb8aa041425bb1050850ac19177686ea6e0f41a70416f56fdb\"}' > cargo/vendor/foldhash-0.2.0/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"cb4cb245038516f5f85277875cdaa4f7d2c9a0fa0468de06ed190163b1581fcf\"}' > cargo/vendor/form_urlencoded-1.2.2/.cargo-checksum.json",
@@ -1255,6 +1302,7 @@
"echo '{\"files\": {}, \"package\": \"4ea269c3bd32f0a32c321907a2ae912ba6f4649bb0fc764a15627e99a7095a3f\"}' > cargo/vendor/zerotrie-0.2.5/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"bb0464e17806c1d976d5cba29399c7f08e516e279e2ba493f63123b5fca67dd8\"}' > cargo/vendor/zerovec-0.11.8/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"34df6fc39dbd26ddc9c10e6a2984476e13acce22e64e4487636ef494369225da\"}' > cargo/vendor/zerovec-derive-0.11.6/.cargo-checksum.json",
+ "echo '{\"files\": {}, \"package\": \"b268e58e7c693d7c271f93ffc4ba3b380412554231c85bf61ca7af91042a4112\"}' > cargo/vendor/zlib-rs-0.6.8/.cargo-checksum.json",
"echo '{\"files\": {}, \"package\": \"b8848ee67ecc8aedbaf3e4122217aff892639231befc6a1b58d29fff4c2cabaa\"}' > cargo/vendor/zmij-1.0.21/.cargo-checksum.json",
"mkdir -p .cargo",
"printf '[source.crates-io]\\nreplace-with = \"vendored-sources\"\\n\\n[source.vendored-sources]\\ndirectory = \"cargo/vendor\"\\n' > .cargo/config.toml"