Vendor asic-rs 0.8.1 (280 crates, offline builds) + wxWidgets 3.3.3 (pristine + patch queue); UI spec + ADR-0003; M1 on asic-rs

This commit is contained in:
2026-09-15 10:41:00 -06:00
parent 78e54915e4
commit 165d899fd8
16428 changed files with 6973006 additions and 25 deletions
+45
View File
@@ -0,0 +1,45 @@
use crate::{EncodeV2, Xz2Encoder, Xz2FileFormat};
use compression_core::{
util::{PartialBuffer, WriteBuffer},
Level,
};
use std::io::Result;
/// Xz encoding stream
#[derive(Debug)]
pub struct XzEncoder {
inner: Xz2Encoder,
}
impl XzEncoder {
pub fn new(level: Level) -> Self {
Self {
inner: Xz2Encoder::new(Xz2FileFormat::Xz, level),
}
}
#[cfg(feature = "xz-parallel")]
pub fn parallel(threads: std::num::NonZeroU32, level: Level) -> Self {
Self {
inner: Xz2Encoder::xz_parallel(level, threads),
}
}
}
impl EncodeV2 for XzEncoder {
fn encode(
&mut self,
input: &mut PartialBuffer<&[u8]>,
output: &mut WriteBuffer<'_>,
) -> Result<()> {
self.inner.encode(input, output)
}
fn flush(&mut self, output: &mut WriteBuffer<'_>) -> Result<bool> {
self.inner.flush(output)
}
fn finish(&mut self, output: &mut WriteBuffer<'_>) -> Result<bool> {
self.inner.finish(output)
}
}