question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add hints to random access availability to archives

See original GitHub issue

Following #707

I’ve noticed you really don’t know if you need to read sequentially or you can access randomly until you have opened the archive… correct me if I’m wrong:

Plain .TAR files can actually be read randomly… but tar archives inside a gzip archive can’t

So, if that’s the case, the SupportsRandomAccess property should go into the IArchive, not in the IArchiveFactory interface, right?

Also, wouldn’t the IsSolid property would be enough for this? (in that case, IsSolid should be true for .tar.gz files, I’ve checked and currently it’s false)

If IsSolid serves a different purpose, then, IArchive definitely needs a SupportsRandomAccess

Any thoughts?

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:11 (11 by maintainers)

github_iconTop GitHub Comments

1reaction
adamhathcockcommented, Dec 5, 2022

So, SevenZip doesn’t have an implementation in the readers factory? is there a reason for it?

This is because 7Zip requires random access to a file from my memory. The streams need to seek around to properly find headers and decompress the streams in the format. Readers only work for non-seekable streams.

0reactions
adamhathcockcommented, Mar 1, 2023

You’ll have to implement that yourself if you can’t guarantee Reader. It’s beyond the scope of the library.

I’ve been away for personal reasons.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Random-access compression in common use?
The main problem with archives is that they typically compress each file individually (no de-duplication across files). Somewhat related to ...
Read more >
Random Access Tar Mount (Ratarmount)
Ratarmount collects all file positions inside a TAR so that it can easily jump to and read from any file without extracting it....
Read more >
Performance degrades when you access large files with ...
The FILE_FLAG_RANDOM_ACCESS flag is a hint to the Cache Manager that the file will be opened for random I/O. Random I/O means there...
Read more >
Random access DNA memory using Boolean search in an ...
We demonstrate random access of image files from a prototypical 2 KB image database using fluorescence sorting with selection sensitivity of ...
Read more >
Commons Compress User Guide
The ZipArchiveOutputStream class will benefit from random access as well but can be used for non-seekable streams - but not all features will...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found