invalid file size inside gz

English support forum

Moderators: white, Hacker, petermad, Stefan2

Post Reply
Senyai
Junior Member
Junior Member
Posts: 14
Joined: 2012-03-02, 14:30 UTC

invalid file size inside gz

Post by *Senyai »

Hi! I have https://arseniy.net/q2.geojson.gz (2.3G) (on russian server) file and inside there is
q2.geojson file, which has size of 7.6G, but TC 9.22rc2 and earlier report it as 3.6G:
Image: https://arseniy.net/q2.geojson.gz.png. Maybe it's as issue.
User avatar
Horst.Epp
Power Member
Power Member
Posts: 6450
Joined: 2003-02-06, 17:36 UTC
Location: Germany

Re: invalid file size inside gz

Post by *Horst.Epp »

You don't expect expect that someone fetches this large file to check for such an error
Windows 11 Home x64 Version 23H2 (OS Build 22631.3374)
TC 11.03 x64 / x86
Everything 1.5.0.1371a (x64), Everything Toolbar 1.3.2, Listary Pro 6.3.0.69
QAP 11.6.3.2 x64
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: invalid file size inside gz

Post by *Dalai »

This is NOT a Total Commander issue. All packers I tested - WinRAR 3.80/5.50/5.60/5.70, 7zip 19.00, gzip on Linux - show the exact same size of 3,958,728,447 bytes for the packed file.

Why this size is shown? No idea. Maybe an issue with the archive's header? Maybe gzip doesn't properly support such file sizes?

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
Senyai
Junior Member
Junior Member
Posts: 14
Joined: 2012-03-02, 14:30 UTC

Re: invalid file size inside gz

Post by *Senyai »

@Delai, you are right, that's not TC. I should've checked that! Sorry for the buzz.

CLOSED
User avatar
Dalai
Power Member
Power Member
Posts: 9364
Joined: 2005-01-28, 22:17 UTC
Location: Meiningen (Südthüringen)

Re: invalid file size inside gz

Post by *Dalai »

It seems to be a limitation of gzip, maybe even a gzip format limiation. The bugs section of the gzip manpage reads
The gzip format represents the input size modulo 2^32, so the --list option reports incorrect uncompressed sizes and compression ratios for uncompressed files 4 GB and larger.
This post on StackExchange quotes an Apple/MacOS X manpage:
BUGS
According to RFC 1952, the recorded file size is stored in a 32-bit integer, therefore, it can not represent files larger than 4GB. This limitation also applies to -l option of gzip utility.
So, it looks like a GZIP file format limitation.

Just for reference: RFC 1952 (GZIP file format spec).

Regards
Dalai
#101164 Personal licence
Ryzen 5 2600, 16 GiB RAM, ASUS Prime X370-A, Win7 x64

Plugins: Services2, Startups, CertificateInfo, SignatureInfo, LineBreakInfo - Download-Mirror
User avatar
clifford_cooley
Junior Member
Junior Member
Posts: 40
Joined: 2019-03-05, 06:04 UTC
Location: USA

Re: invalid file size inside gz

Post by *clifford_cooley »

Yep 3.6G plus the 33rd bit [which is ignored by limitation] is 7.6G.
License #116347
User avatar
Hacker
Moderator
Moderator
Posts: 13052
Joined: 2003-02-06, 14:56 UTC
Location: Bratislava, Slovakia

Re: invalid file size inside gz

Post by *Hacker »

[mod="Hacker"]Moved to the English forum.[/mod]
Mal angenommen, du drückst Strg+F, wählst die FTP-Verbindung (mit gespeichertem Passwort), klickst aber nicht auf Verbinden, sondern fällst tot um.
Post Reply