Skip to content

Commit

Permalink
Merge pull request #133 from ctron/feature/liblzma_1
Browse files Browse the repository at this point in the history
chore: switch from xz2 to liblzma
  • Loading branch information
brianheineman authored Sep 4, 2024
2 parents 106c365 + 61f0804 commit a17df89
Show file tree
Hide file tree
Showing 5 changed files with 27 additions and 24 deletions.
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1 +1,4 @@
/target

# Rust Rover
/.idea
42 changes: 21 additions & 21 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,7 @@ http = "1.1.0"
human_bytes = { version = "0.4.3", default-features = false }
indicatif = "0.17.8"
indoc = "2.0.5"
liblzma = "0.3.4"
md-5 = "0.10.6"
num-format = "0.4.4"
pgvector = "0.4.0"
Expand Down Expand Up @@ -65,7 +66,6 @@ tracing = "0.1.40"
tracing-indicatif = "0.3.6"
tracing-subscriber = "0.3.18"
url = "2.5.2"
xz2 = "0.1.7"
zip = "2.2.0"

[workspace.metadata.release]
Expand Down
2 changes: 1 addition & 1 deletion postgresql_archive/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ futures-util = { workspace = true }
hex = { workspace = true }
http = { workspace = true }
human_bytes = { workspace = true, default-features = false }
liblzma = { workspace = true }
md-5 = { workspace = true, optional = true }
num-format = { workspace = true }
quick-xml = { workspace = true, features = ["serialize"], optional = true }
Expand All @@ -38,7 +39,6 @@ tokio = { workspace = true, features = ["full"], optional = true }
tracing = { workspace = true, features = ["log"] }
tracing-indicatif = { workspace = true }
url = { workspace = true }
xz2 = { workspace = true }
zip = { workspace = true }

[dev-dependencies]
Expand Down
2 changes: 1 addition & 1 deletion postgresql_archive/src/extractor/tar_xz_extractor.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2,13 +2,13 @@ use crate::extractor::ExtractDirectories;
use crate::Error::Unexpected;
use crate::Result;
use human_bytes::human_bytes;
use liblzma::bufread::XzDecoder;
use num_format::{Locale, ToFormattedString};
use std::fs::{create_dir_all, File};
use std::io::{copy, BufReader, Cursor};
use std::path::PathBuf;
use tar::Archive;
use tracing::{debug, instrument, warn};
use xz2::bufread::XzDecoder;

/// Extracts the compressed tar `bytes` to paths defined in `extract_directories`.
///
Expand Down

0 comments on commit a17df89

Please sign in to comment.