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

Support archives with comments. #14

Open
TohruMKDM opened this issue Sep 9, 2022 · 3 comments
Open

Support archives with comments. #14

TohruMKDM opened this issue Sep 9, 2022 · 3 comments

Comments

@TohruMKDM
Copy link

You can reliably strip away comments (at least based off of my testing) thus allowing this project to work as intended.

local start = string.find(data, 'PK\5\6')
if start then
    data = string.sub(data, 1, start + 19)..'\0\0'
end

with data being the bitstream's buffer.

@zerkman
Copy link
Owner

zerkman commented Sep 11, 2022

thanks for the suggestion, but what happens if the 'PK\5\6' string appears in the packed data ?
Supporting comments is an open door to unwanted behaviour. I'm not even sure modern zip management tools support comments in zip files anyway. So, better not support it at all.

@TohruMKDM
Copy link
Author

I did not think of that. Wouldn't you just be able to search for that string in reverse? The last instance of it should always be the comment.

@justdie386
Copy link

justdie386 commented Mar 29, 2024

Hey, i'd like to use this project, but it seems i am having the same issue with comments, has any progress been made? any known fix to ignore the comments?

I'd really like to use this library because it looks awesome, and its written in pure lua so no compiling hassle like every other lua unzip libraries out there

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

3 participants