Add read_archive and list_archive_entries support #389
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR is part of the discussion in #366 where we want to reduce the C++ implementation by reusing primitive ops for archive support.
The idea is to implement C++ kernel that could be used in general, than adding additional C++ for each Dataset.
Summary:
SizedRandomAccessFilewhich is a subclass of tensorflow'sRandomAccessFile.Overall, we expect files compressed in archive not to be too big so it should at least fit into CPU memory. While files such as HDF5 or parquet could be really large, the compression normally happens at the file format level so additional archive/compression outside with huge file (e.g. hundreds of GBs) are rarely heard of. So, the implementation in this PR should be enough for normal need.
Signed-off-by: Yong Tang [email protected]