Skip to content

Commit

Permalink
chore(deps): adapt to Zopfli v0.8.0 API changes
Browse files Browse the repository at this point in the history
  • Loading branch information
AlexTMjugador committed Sep 28, 2023
1 parent 2b845ca commit ce7448a
Showing 1 changed file with 5 additions and 5 deletions.
10 changes: 5 additions & 5 deletions packages/packsquash/src/squash_zip.rs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ use std::{
borrow::Cow,
collections::hash_map::Entry,
io::{self, ErrorKind, Read, SeekFrom},
num::{NonZeroU8, TryFromIntError},
num::{NonZeroU64, TryFromIntError},
path::Path,
string::FromUtf8Error,
sync::LazyLock,
Expand Down Expand Up @@ -750,18 +750,18 @@ impl<F: AsyncRead + AsyncSeek + Unpin> SquashZip<F> {
processed_data_scratch_file.rewind().await?;

zopfli::compress(
&zopfli::Options {
iteration_count: NonZeroU8::new(
zopfli::Options {
iteration_count: NonZeroU64::new(
self.zopfli_iterations_time_model.iterations_for_data_size(
processed_data_size,
1,
MAXIMUM_ZOPFLI_ITERATIONS
)
) as u64
)
.unwrap(),
..Default::default()
},
&Format::Deflate,
Format::Deflate,
&mut processed_data_scratch_file,
&mut compressed_data_scratch_file
)?;
Expand Down

0 comments on commit ce7448a

Please sign in to comment.