Finished the algorithm for packing and unpacking files

This commit is contained in:
2024-01-06 03:48:19 +04:00
parent 58b6314dec
commit cec2ad2c62
2 changed files with 7 additions and 2 deletions

View File

@ -102,7 +102,7 @@ fn unpack(input: String, output: String) {
// Распаковываем файлы в директорию
for element in &list {
let path = format!("{}/{}", output, element.name);
let path = format!("{}/{}.{}", output, element.name, element.index);
let mut file = File::create(path).unwrap();
let mut file_buffer = vec![0u8; element.size as usize];