make it work with my version
This commit is contained in:
Generated
+1
-2
@@ -231,8 +231,7 @@ checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd"
|
||||
[[package]]
|
||||
name = "pklib"
|
||||
version = "0.2.0"
|
||||
source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||
checksum = "e88b72c1327d25f7c73e2ac5a565ae1f7703a310aea1edfb4ea57ac2243e28f2"
|
||||
source = "git+https://github.com/fgRuslan/pklib-rs?branch=main#cedf169266d70f10cd1d6c9fd9d3fc38fccf6604"
|
||||
dependencies = [
|
||||
"clap",
|
||||
"indicatif",
|
||||
|
||||
+1
-1
@@ -5,7 +5,7 @@ edition = "2024"
|
||||
|
||||
[dependencies]
|
||||
clap = "4.6.1"
|
||||
pklib = "0.2.0"
|
||||
pklib = { git = "https://github.com/fgRuslan/pklib-rs", branch = "main" }
|
||||
rawzip = "0.4.4"
|
||||
|
||||
[profile.release]
|
||||
|
||||
+9
-1
@@ -1,4 +1,4 @@
|
||||
use std::{fs::{self, File}, io::{Read, Seek, Write}, time::UNIX_EPOCH};
|
||||
use std::{fs::{self, File}, io::{Read, Seek, Write}, process::exit, time::UNIX_EPOCH};
|
||||
use pklib;
|
||||
use rawzip::{ZipArchiveWriter, time::ZipDateTime};
|
||||
use clap::{Parser, Subcommand};
|
||||
@@ -18,6 +18,14 @@ struct Args {
|
||||
output_archive: String
|
||||
}
|
||||
|
||||
#[test]
|
||||
fn test_large_file_implode() {
|
||||
let data = vec![0u8; 50_000];
|
||||
let compressed = pklib::implode_bytes(&data, pklib::CompressionMode::Binary, pklib::DictionarySize::Size4K).unwrap();
|
||||
let decompressed = pklib::explode_bytes(&compressed).unwrap();
|
||||
assert_eq!(data.len(), decompressed.len());
|
||||
}
|
||||
|
||||
fn implode_test(input_dir: String, output_archive: String) -> Result<(), Box<dyn std::error::Error>> {
|
||||
let mut output = Vec::new();
|
||||
let mut archive = rawzip::ZipArchiveWriter::new(&mut output);
|
||||
|
||||
Reference in New Issue
Block a user