Skip to content

Ruby zip is truncating data when file is large  #563

@hmfarooq

Description

@hmfarooq

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      pFad - Phonifier reborn

      Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

      Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


      Alternative Proxies:

      Alternative Proxy

      pFad Proxy

      pFad v3 Proxy

      pFad v4 Proxy