flanglet / kanzi-cpp

Fast lossless data compression in C++
Apache License 2.0
137 stars 3 forks source link

Directory as input #3

Closed AR1415 closed 3 years ago

AR1415 commented 3 years ago

the input option for a directory to compress to a single file seems to compress each file individually instead of all merged into one. is whole directory not supported?

flanglet commented 3 years ago

This is a design choice since it is possible to tar either the source directory before or the destination directory after compression. EG: tar cf dir.tar dir && kanzi -c -i dir.tar -f -l 1 EG: kanzi -c -i dir -o out -f -l 1 && tar cf out.tar out

AR1415 commented 3 years ago

it appears an error:

Warning: ignoring unknown option [tar] Warning: ignoring unknown option [cf]

flanglet commented 3 years ago

Are you on Windows ? Otherwise tar is a commonly available tool.

AR1415 commented 3 years ago

oh yes i am on the Windows operating system perhaps this is why

AR1415 commented 3 years ago

ah i nearly have it, i get a small error come back saying dir.tar cannot access input

flanglet commented 3 years ago

Try line by line tar cf .tar kanzi -c -i .tar -f -l 1

AR1415 commented 3 years ago

im still receiving the error "Cannot access input file 'dir.tar'. Error code: 10"

flanglet commented 3 years ago

It means the compressor cannot find the file 'dir.tar'. Did you call it differently ? Did you change directories ? Did the first command succeed ? What does "dir dir.tar" return ?

AR1415 commented 3 years ago

the first command making the dir.tar file with the files in it works fine, i can see the files with 7z. but the command with kanzi kicks back that it cant access the input file when it is sitting next to it

flanglet commented 3 years ago

What does "dir dir.tar" return ? What are your exact command lines ?

AR1415 commented 3 years ago

tar cf dir.tar "D:\Hearthstone" && Kanzi64.exe -c -i dir.tar -f -b 1g -l 9

flanglet commented 3 years ago

OK. Then if you type simply "Kanzi64.exe -c -i dir.tar -f -b 1g -l 9", you get the error ? What is the size of dir.tar ?

AR1415 commented 3 years ago

yes typing in just that kanzi command has the error. the tar file is fine its 5GB as the source size is originally

flanglet commented 3 years ago

There may be a problem with files over 4GB on Windows. I do not have such a file to test. I will look into this.

flanglet commented 3 years ago

I uploaded a mingw based Windows executable in a zip asset attached to the release. Can you try it ?

AR1415 commented 3 years ago

i have tested with another folder of 3.5GB issue still persists. But less than 2GB input works.

flanglet commented 3 years ago

I uploaded a new Kanzi64.exe. Give it a try and let me know.

AR1415 commented 3 years ago

error still occurs

AR1415 commented 3 years ago

sorry i meant there is a different error that says "The input and output files must be different"

AR1415 commented 3 years ago

oh i downloaded the wrong one, the new one uploaded seems to work now