Proposal to improve the archive content parsing function, incorect comment in this function #2

Open
opened 6 years ago by SlavekB · 0 comments
Owner

From Antonio Diaz Diaz

Line 1047 of krArc/krarc.cpp contains the following comment:

// first field is uncompressed size - ignore it

The comment is incorrect. The first field of GNU 'gzip -l' is the
compressed size:

$ gzip -l krusader-master.tar.gz
compressed uncompressed ratio uncompressed_name
2952988 10700800 72.4% krusader-master.tar

There are two parse functions in krusader
('tdeio_krarcProtocol::parseLine' and 'arc_vfs::parseLine'), and both
parse the uncompressed size, so I have done the same for lzip.

BTW, maybe both functions should use a common parsing code to prevent
the parsers from diverging. ('size' is parsed as unsigned long in one
and as long in the other).

**From Antonio Diaz Diaz** Line 1047 of krArc/krarc.cpp contains the following comment: // first field is uncompressed size - ignore it The comment is incorrect. The first field of GNU 'gzip -l' is the compressed size: $ gzip -l krusader-master.tar.gz compressed uncompressed ratio uncompressed_name 2952988 10700800 72.4% krusader-master.tar There are two parse functions in krusader ('tdeio_krarcProtocol::parseLine' and 'arc_vfs::parseLine'), and both parse the uncompressed size, so I have done the same for lzip. BTW, maybe both functions should use a common parsing code to prevent the parsers from diverging. ('size' is parsed as unsigned long in one and as long in the other).
SlavekB added the SL/minor label 6 years ago
Sign in to join this conversation.
No Milestone
No Assignees
1 Participants
Notifications
Due Date

No due date set.

Dependencies

No dependencies set.

Reference: TDE/krusader#2
Loading…
There is no content yet.