Question: Does this have 7zip reader? #652

Closed
opened 2026-01-29 22:15:19 +00:00 by claunia · 4 comments
Owner

Originally created by @0x5bfa on GitHub (Aug 22, 2024).

I'm finding a room to implement 7zip writer using managed-lzma and during walking through the code base I found 7zip reader while FORMATS.md says N/A

Code was added intially 11 years ago but the table of FORMATS.md updated 2 years ago.

8de33f0db3/src/SharpCompress/Archives/SevenZip/SevenZipArchive.cs (L202-L254)

8de33f0db3/FORMATS.md (L21)

7zip reader exists or still missing?

Originally created by @0x5bfa on GitHub (Aug 22, 2024). I'm finding a room to implement 7zip writer using managed-lzma and during walking through the code base I found 7zip reader while FORMATS.md says N/A Code was added intially 11 years ago but the table of FORMATS.md updated 2 years ago. https://github.com/adamhathcock/sharpcompress/blob/8de33f0db3ad09f85fe96e953418935d05186aa6/src/SharpCompress/Archives/SevenZip/SevenZipArchive.cs#L202-L254 https://github.com/adamhathcock/sharpcompress/blob/8de33f0db3ad09f85fe96e953418935d05186aa6/FORMATS.md?plain=1#L21 7zip reader exists or still missing?
Author
Owner

@adamhathcock commented on GitHub (Aug 22, 2024):

There is no 7ZipReader interface becase 7Zip doesn't support forward only. It requires random access to the stream which is against the reader interface. Internally, 7Zip is made of streams that are forward only

@adamhathcock commented on GitHub (Aug 22, 2024): There is no 7ZipReader interface becase 7Zip doesn't support forward only. It requires random access to the stream which is against the reader interface. Internally, 7Zip is made of streams that are forward only
Author
Owner

@0x5bfa commented on GitHub (Aug 23, 2024):

Thanks for the reply and understood.

I have a couple of questions:

  • Compression API can still be implemented using managed-lzma? I saw an old issue mentioning this.
  • SevenZipSharp supports (if you know) forward only reader and writer? Or does it do random access?

I have been looking for alternative to SevenZipSharp as it is slow to integrate in order to use files-community/Files. This looks great and I'd like to contribute 7zip parts.

managed-lzma reader and writer impl:
https://github.com/weltkante/managed-lzma/tree/master/shared/SevenZip

@0x5bfa commented on GitHub (Aug 23, 2024): Thanks for the reply and understood. I have a couple of questions: - Compression API can still be implemented using managed-lzma? I saw an old issue mentioning this. - SevenZipSharp supports (if you know) forward only reader and writer? Or does it do random access? I have been looking for alternative to SevenZipSharp as it is slow to integrate in order to use [files-community/Files](https://github.com/files-community/Files). This looks great and I'd like to contribute 7zip parts. managed-lzma reader and writer impl: https://github.com/weltkante/managed-lzma/tree/master/shared/SevenZip
Author
Owner

@adamhathcock commented on GitHub (Sep 2, 2024):

I believe we still use the managed LZMA internally. I don't want native dependencies.

I don't believe anything supports forward only always because it's against the 7Zip spec. Which is why it's il-suited, imo. 7Zip always wants random access which usually means a file.

@adamhathcock commented on GitHub (Sep 2, 2024): I believe we still use the managed LZMA internally. I don't want native dependencies. I don't believe anything supports forward only always because it's against the 7Zip spec. Which is why it's il-suited, imo. 7Zip always wants random access which usually means a file.
Author
Owner

@0x5bfa commented on GitHub (Nov 14, 2024):

I see.

@0x5bfa commented on GitHub (Nov 14, 2024): I see.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#652