ntruessel / etar Goto Github PK
View Code? Open in Web Editor NEWcompression in Eiffel (based on tar)
License: Other
compression in Eiffel (based on tar)
License: Other
Giving an invalid path to archive returns an operating system error
The ustar utilities should contain links to the tar specification
Some of the tests (most of the tests that create/open files) have machine dependent metadata. Check whether we can find a way to fix this
All calculations/writing and so forth in ARCHIVABLE and FILE_ARCHIVABLE assume that USTAR_HEADER_WRITER is used
The UNARCHIVER parent class has slightly changed
ATM files in FILE_ARCHIVABLE
are duplicated with the .twin feature. Maybe this is not enough to create a copy like it is intended. To be tested (and fixed if necessary).
PAX provides a reserved identifier for mtime whereas USTAR_HEADER_WRITER does not even check whether the value might be too large.
Either argument why this check can be omitted or implement it
Pax global headers are not tested at all
when trying to extract foo.tar ... I do
minipax -r -f foo.tar
but if foo.tar does not exists ... the execution violates assertions, it is missing a simple file existence checking .. and appropriate error message.
This is minor issue for the example, but could be annoying for a tool.
Some classes use make
, some use default_create
. Should be unified
Just found another uncovered feature with a bug in its precondition.
PAX_UNARCHIVER
does not parse its entries cleanly, e.g. a space in some key/value will cause the parser to throw an error
Both USTAR_HEADER_PARSER
and USTAR_HEADER_WRITER
calculate the checksum using own features. These should be merged (e.g. in some TAR_UTILS
parent class?)
As written in #9, verify_checksum needs performance improvements
ATM this feature adds one block for the header which might be correct for the ustar format but is wrong for pax (it is dependent on the header writer)
ATM the FILE_UNARCHIVER only creates a new file with the correct filename, but without setting any metadata that the header provides (like user, group, mode, mtime...)
The constants in TAR_CONST
(mostly offset and length) should be grouped in such a way that mistakes like
parse_string (block, {TAR_CONST}.tar_header_devmajor_offset, {TAR_CONST}.tar_header_devminor_length)
become more obvious
This could be done by creating a custom class (+ once routine) for them (but then, the advantage of not having to inherit from TAR_CONST
is lost)
The method USTAR_HEADER_WRITER
is quite inefficient: It initializes Result
as an empty string which is inefficient most of the cases. There is still room for improvements (parse_string
is one of the core features used by the header parsers).
A header parser that does not have any error messages should always have an attached header (ATM the header can be Void even when no error messages were logged)
ATM error handling is rather cumbersome. For a single class it is quite easy, but as soon as this class has attributes that can produce errors as well it gets cumbersome to check whether an error occurred (have to check all attributes).
I propose some interface that allows me to register an error logger/reporter for classes that need it, such that errors can be reported / checked in a central place.
The eiffel documentation tells that path strings are required to use the "escaped representation as described in UTF_CONVERTER
".
Have to check what exactly this means and whether the library uses it / how to change it to do it correctly
On windows, set_date for files which are a directory fails (Operating System Error)
The code that calculates the needed blocks exists twice, once for ARCHIVABLE, once for UNARCHIVER. See #14
For the last entry, pax unarchiver does not check whether the parsing state machine is in an accepting state
The ustar header parsing is so slow that the content listing demo takes ages to list the contents of an archive for which bsdtar needs milliseconds (archives/etar.tar). This is possibly caused by
TAR_HEADER_PARSER
The test set for ustar headers does not contain any tests that use file names with non-ASCII characters. There should be tests for that as well
Currently only complete writing is tested, all block-wise writing features are untested.
ATM PAX_HEADER_PARSER
does not check whether a pax header is global or extended. Therefore it will probably crash if one feeds it with a global header followed by an extended header, followed by an ustar header
The mtime format in extended headers seems to differ from the header mtime format. However we do write mtime in this special format yet
Nearly all classes that report errors are not tested for cases where errors occur
ATM all tests check whether valid inputs are accepted. There should also be tests that check whether invalid inputs are rejected.
Paths containing ..
and absolute paths should be disabled
Setting uid/gid to 0 causes an "Operation not permitted" operating system error.
To demonstrate some parts of the library, I want an example that outputs all the contents of a tar file, but not their payload.
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.