Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

command line version #2

Open
cieplutki opened this issue Jun 26, 2017 · 7 comments
Open

command line version #2

cieplutki opened this issue Jun 26, 2017 · 7 comments

Comments

@cieplutki
Copy link

Hey,
I have checked your program and it works fabulous. It's great but there is a problem - it's too user friendly - it can't be utilised in script nor combined with file manager as "plugin archiver" as it doesn't process command line. Have you got or possibly can do command line version?

PS. Tried to put it in request's but couldn't.

@JosePineiro
Copy link
Owner

Please, Test using this parameters:
Littlezip "Source directory" "file.zip"

@cieplutki
Copy link
Author

cieplutki commented Dec 27, 2017

Just tested file bin/Release/LittleZipTest.exe and it is failing with unhandled exception: (no matter whether paths are relative or absolute)

************** Exception Text **************
System.Exception: Invalid ZIP file
In LittleZip.Create
   at System.IO.Compression.LittleZip..ctor(String pathFilename, String zipComment)
   at LittleZipTest.LittleZipTest.buttonZIP_Click(Object sender, EventArgs e)
   at LittleZipTest.LittleZipTest.LittleZipTest_Load(Object sender, EventArgs e)
   at System.Windows.Forms.Form.OnLoad(EventArgs e)
   at System.Windows.Forms.Control.CreateControl(Boolean fIgnoreVisible)
   at System.Windows.Forms.Control.CreateControl()
   at System.Windows.Forms.Control.WmShowWindow(Message& m)
   at System.Windows.Forms.Control.WndProc(Message& m)
   at System.Windows.Forms.Control.ControlNativeWindow.WndProc(Message& m)
   at System.Windows.Forms.NativeWindow.Callback(IntPtr hWnd, Int32 msg, IntPtr wparam, IntPtr lparam)

************** Loaded Assemblies **************

When I run it from cygwin bash it just crashes, without any message.

--

IMO the parameters should be opposite like in all other archivers:
$ pak <file.pak> <list of files to pak>

@JosePineiro
Copy link
Owner

Please. Test the new version.

@cieplutki
Copy link
Author

Works very well.
Will still insist to swap arguments so the archive.zip would be first as in all other packers. It will not change functionality whatsoever rather improve.

@JosePineiro
Copy link
Owner

Swapped arguments. Please, suggest command for set the compression level. To be one number betwen 0 and 500.

@cieplutki
Copy link
Author

What would you need 500 levels for? Like in standard zip/gzip -1 to -9 and here up to -12. Just like you use in your api and as it is in libdeflate. Believe or not, but when I see compressor with hundreds of compression levels it puts me off.
I use -12 by default unless I really want to make it quick (which is rare). But that's less of concern if you use it as packer (like here). Most of the time you don't bother that much of compression time in desktop environment and if you do then you have time to adjust compression for your needs anyway.

@JosePineiro
Copy link
Owner

The level are for the compression algorithm select
0-9 standard ZIP
10-12 libdeflate 'lazy' algorithm
13 -500 zopfly algorithm. A more level, more compresion and slowwwwww...
What command line parameters do you need?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants