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

Ruby zip is truncating data when file is large #563

Open
hmfarooq opened this issue Sep 26, 2023 · 2 comments
Open

Ruby zip is truncating data when file is large #563

hmfarooq opened this issue Sep 26, 2023 · 2 comments

Comments

@hmfarooq
Copy link

hmfarooq commented Sep 26, 2023

I have a CSV file of size 15GB with a row count of 500k. When I use ruby zip to make it zip it will create a file with a size of 2.83 GB. and when I extract this file it contains only 87k with size 2.5 GB.

rubyzip version 1.3.0 I also tried with 2.3.0 and it did not work

  zip_file = "myfile.zip"
   Zip::File.open(zip_file, Zip::File::CREATE) do |zipfile|
     Dir.glob("/15gb.csv").each do |csv_file_path|
       csv_file_name = csv_file_path.split('/').last
       zipfile.add(csv_file_name, csv_file_path)
     end
   end
@hainesr
Copy link
Member

hainesr commented Oct 16, 2023

Would you mind testing with HEAD or version 3.0.0.alpha (via Rubygems)?

@hainesr
Copy link
Member

hainesr commented Mar 1, 2024

Can I also check that you have Zip.write_zip64_support set to true? It's false by default.

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