Skip to content

Commit

Permalink
Bump libcramjam/isal-rs (#183)
Browse files Browse the repository at this point in the history
* Bump libcramjam/isal-rs

* Loosen libcramjam version dep
  • Loading branch information
milesgranger authored Oct 5, 2024
1 parent 01b0002 commit 33c4950
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 6 deletions.
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cramjam-python"
version = "2.8.4"
version = "2.8.5-rc1"
authors = ["Miles Granger <miles59923@gmail.com>"]
edition = "2021"
license = "MIT"
Expand Down Expand Up @@ -53,7 +53,7 @@ wasm32-compat = ["libcramjam/wasm32-compat"]

[dependencies]
pyo3 = { version = "^0.22", default-features = false, features = ["macros"] }
libcramjam = { version = "0.5.1", default-features = false }
libcramjam = { version = "^0.5", default-features = false }

[build-dependencies]
pyo3-build-config = "^0.22"
Expand Down
7 changes: 3 additions & 4 deletions src/igzip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ pub mod igzip {
/// IGZIP Compressor object for streaming compression
#[pyclass(unsendable)] // TODO: make sendable
pub struct Compressor {
inner: Option<libcramjam::igzip::isal::igzip::write::Encoder<Cursor<Vec<u8>>>>,
inner: Option<libcramjam::igzip::isal::write::GzipEncoder<Cursor<Vec<u8>>>>,
}

#[pymethods]
Expand All @@ -73,11 +73,10 @@ pub mod igzip {
#[pyo3(signature = (level=None))]
pub fn __init__(level: Option<u32>) -> PyResult<Self> {
let level = level.unwrap_or(DEFAULT_COMPRESSION_LEVEL);
let inner = libcramjam::igzip::isal::igzip::write::Encoder::new(
let inner = libcramjam::igzip::isal::write::GzipEncoder::new(
Cursor::new(vec![]),
libcramjam::igzip::isal::igzip::CompressionLevel::try_from(level as isize)
libcramjam::igzip::isal::CompressionLevel::try_from(level as isize)
.map_err(CompressionError::from_err)?,
true,
);
Ok(Self { inner: Some(inner) })
}
Expand Down

0 comments on commit 33c4950

Please sign in to comment.