Repository: wcampbell0x2a/backhand (language: rust)

Issue:
Replace zune-inflate with libdeflater for testing reliability



Discussion / hints:
## [Codecov](https://app.codecov.io/gh/wcampbell0x2a/backhand/pull/325?src=pr&el=h1&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wcampbell) Report
All modified and coverable lines are covered by tests :white_check_mark:

| [Files](https://app.codecov.io/gh/wcampbell0x2a/backhand/pull/325?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wcampbell) | Coverage Δ | |
|---|---|---|
| [src/compressor.rs](https://app.codecov.io/gh/wcampbell0x2a/backhand/pull/325?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wcampbell#diff-c3JjL2NvbXByZXNzb3IucnM=) | `71.07% <ø> (ø)` | |
| [src/filesystem/reader.rs](https://app.codecov.io/gh/wcampbell0x2a/backhand/pull/325?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wcampbell#diff-c3JjL2ZpbGVzeXN0ZW0vcmVhZGVyLnJz) | `92.02% <ø> (ø)` | |
| [src/kinds.rs](https://app.codecov.io/gh/wcampbell0x2a/backhand/pull/325?src=pr&el=tree&utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wcampbell#diff-c3JjL2tpbmRzLnJz) | `58.82% <ø> (ø)` | |


:loudspeaker: Thoughts on this report? [Let us know!](https://about.codecov.io/pull-request-comment-report/?utm_medium=referral&utm_source=github&utm_content=comment&utm_campaign=pr+comments&utm_term=wcampbell)


Fix patch:
diff --git a/Cargo.lock b/Cargo.lock
index d589738f..ea186114 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -127,6 +127,7 @@ dependencies = [
  "criterion",
  "deku",
  "dir-diff",
+ "document-features",
  "flate2",
  "libdeflater",
  "rust-lzo",
@@ -526,6 +527,15 @@ version = "0.3.3"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "fea41bba32d969b513997752735605054bc0dfa92b4c56bf1189f2e174be7a10"
 
+[[package]]
+name = "document-features"
+version = "0.2.7"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "e493c573fce17f00dcab13b6ac057994f3ce17d1af4dc39bfd482b83c6eb6157"
+dependencies = [
+ "litrs",
+]
+
 [[package]]
 name = "either"
 version = "1.9.0"
@@ -812,6 +822,12 @@ version = "0.4.11"
 source = "registry+https://github.com/rust-lang/crates.io-index"
 checksum = "969488b55f8ac402214f3f5fd243ebb7206cf82de60d3172994707a4bcc2b829"
 
+[[package]]
+name = "litrs"
+version = "0.2.3"
+source = "registry+https://github.com/rust-lang/crates.io-index"
+checksum = "f9275e0933cf8bb20f008924c0cb07a0692fe54d8064996520bf998de9eb79aa"
+
 [[package]]
 name = "log"
 version = "0.4.20"
diff --git a/Cargo.toml b/Cargo.toml
index 2e41813d..29f0f94d 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -23,3 +23,4 @@ inherits = "release"
 codegen-units = 1
 lto = true
 strip = true
+
diff --git a/backhand-cli/Cargo.toml b/backhand-cli/Cargo.toml
index 53dedef2..b56da061 100644
--- a/backhand-cli/Cargo.toml
+++ b/backhand-cli/Cargo.toml
@@ -28,9 +28,17 @@ version = "0.5.4"
 # These features mirror the backhand features
 [features]
 default = ["backhand/xz", "backhand/gzip", "backhand/zstd"]
+## Enables xz compression inside library and binaries
 xz = ["backhand/xz"]
+## Enables xz compression and forces static build inside library and binaries
 xz-static = ["backhand/xz-static"]
+## Enables gzip compression inside library and binaries
 gzip = ["backhand/gzip"]
-# this library is licensed GPL and thus disabled by default
+## This library is licensed GPL and thus disabled by default
 lzo = ["backhand/lzo"]
+## Enables zstd compression inside library and binaries
 zstd = ["backhand/zstd"]
+
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
\ No newline at end of file
diff --git a/backhand/Cargo.toml b/backhand/Cargo.toml
index 503e4117..e1b99f39 100644
--- a/backhand/Cargo.toml
+++ b/backhand/Cargo.toml
@@ -21,14 +21,19 @@ rust-lzo = { version = "0.6.2", optional = true }
 zstd = { version = "0.13.0", optional = true }
 rustc-hash = "1.1.0"
 byte-unit = "4.0.18"
+document-features = { version = "0.2.7", optional = true }
 
 [features]
 default = ["xz", "gzip", "zstd"]
+## Enables xz compression inside library and binaries
 xz = ["dep:xz2"]
+## Enables xz compression and forces static build inside library and binaries
 xz-static = ["dep:xz2", "xz2?/static"]
+## Enables gzip compression inside library and binaries
 gzip = ["dep:flate2"]
-# this library is licensed GPL and thus disabled by default
+## This library is licensed GPL and thus disabled by default
 lzo = ["dep:rust-lzo"]
+## Enables zstd compression inside library and binaries
 zstd = ["dep:zstd"]
 
 [dev-dependencies]
@@ -43,3 +48,7 @@ libdeflater = "1.19.0"
 [[bench]]
 name = "benchmark"
 harness = false
+
+[package.metadata.docs.rs]
+all-features = true
+rustdoc-args = ["--cfg", "docsrs"]
\ No newline at end of file
diff --git a/backhand/src/lib.rs b/backhand/src/lib.rs
index 864223eb..c3786768 100644
--- a/backhand/src/lib.rs
+++ b/backhand/src/lib.rs
@@ -48,6 +48,9 @@
 //! let mut output = File::create("modified.squashfs").unwrap();
 //! write_filesystem.write(&mut output).unwrap();
 //! ```
+//!
+//! # Features
+#![cfg_attr(feature = "document-features", doc = document_features::document_features!())]
 
 #[doc = include_str!("../../README.md")]
 type _ReadmeTest = ();


Test patch: