`Zlib::GzipReader` doesn't read some large files
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 4/5
- Thời gian dự kiến
- 3-5 ngày
- Mức phù hợp với người mới
- 25/100
Hướng nghiên cứu
Bắt đầu bằng cách tái hiện báo cáo với Zlib::GzipReader.open trên adresses-france.csv.gz và so sánh đầu ra của nó với kết quả của lệnh gzip. Kiểm tra xem hành vi này có chỉ xảy ra với tệp đã nén hay với việc đọc các tệp lớn; hoàn tất khi xác định được lý do toàn bộ nội dung đã giải nén không được trả về.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Hi.
I have to inflate a .csv.gz file which should return a 4 GB CSV with 25 million rows.
When I use an app or the gzip command line, I get the full file without issue.
When I use Zlib::GzipReader, only the first row is returned.
> Zlib::GzipReader.open("adresses-france.csv.gz") { |gz| print gz.read }
id;id_fantoir;numero;rep;nom_voie;code_postal;code_insee;nom_commune;code_insee_ancienne_commune;nom_ancienne_commune;x;y;lon;lat;type_position;alias;nom_ld;libelle_acheminement;nom_afnor;source_position;source_nom_voie;certification_commune;cad_parcelles
=> nil
The file is provided by the french government:
- the directory: https://adresse.data.gouv.fr/data/ban/adresses/latest/csv
- the file: https://adresse.data.gouv.fr/data/ban/adresses/latest/csv/adresses-france.csv.gz
There are many other files in the directory (for each region) but I cannot reproduce the issue with other files.
This service also provided a similar file in Addok format (https://adresse.data.gouv.fr/data/ban/adresses/latest/addok/adresses-addok-france.ndjson.gz) which should return a 3GB file with 2 million rows, but only the 25k first rows are returned by Zlib::GzipReader.
Is there any limit to what Zlib can support ? (size, rows, ..)
Does it come from the compressed file ?
- Ngôn ngữ chính
- C
- Star
- 73
- Fork
- 40
- Merge trung bình
- 10 giờ 32 phút
- Pull request đã merge (30 ngày)
- 2
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của ruby/zlib
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 72/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 55/100
-
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 42/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 35/100
-
Độ khó 4/5 3-5 ngày Mức phù hợp với người mới 30/100
Issue tương tự
-
bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
bradcypert/plum#53 ·
-
Component: GLib
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
-
Status: Opened
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 70/100
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 75/100
nextbsd/nextbsd-userland#285 ·