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

compression rate #5

Open
KonstantinKuklin opened this issue Nov 7, 2013 · 6 comments
Open

compression rate #5

KonstantinKuklin opened this issue Nov 7, 2013 · 6 comments
Assignees

Comments

@KonstantinKuklin
Copy link

WIll you add support for the compression level?

@ghost ghost assigned payden Nov 7, 2013
@payden
Copy link
Owner

payden commented Nov 7, 2013

It would certainly be easy enough to add a php.in I setting. Would that suffice for you? Haven't looked at this code for a bit but I'll take a look tonight.

@payden
Copy link
Owner

payden commented Nov 7, 2013

Damn auto complete on my phone. Php.ini setting is what that should be.

@KonstantinKuklin
Copy link
Author

I mean that sometimes I need fast compression with bad level 30-60%, but when I save file or dir to long time on server I try to use best compression level. Maybe function xzopen get one more parameter LEVEL? Is it possible?

@payden
Copy link
Owner

payden commented Nov 7, 2013

Yes, it wouldn't be a problem to add an optional parameter for compression level to XZ open and keep that compression level associated with the resource handle. I'll take a look and see what I can come up with. I'll comment back here when I have something for you to check out.

@payden
Copy link
Owner

payden commented Nov 7, 2013

I just threw this together in about 30 minutes before work. I haven't had time to test it really. Play around and see if that works for you. I'll take a closer look and make sure I didn't miss anything later.

Added optional parameter level for xzopen.

Looks like this: $fh = xzopen('test.xz', 'w', 0);

Proto: xzopen($filename, $mode, $compression_level);

compression_level must be 0-9 inclusive.

Let me know if this works.

@KonstantinKuklin
Copy link
Author

thank you for commits.
I'll try and let you know

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