Add Entry.GetKeyBytes() method #215

Closed
opened 2026-01-29 22:08:30 +00:00 by claunia · 5 comments
Owner

Originally created by @xupefei on GitHub (Jul 15, 2017).

Related to #163, #261 and #266.

Since the string encoding in Zip archive is such a great pain, is it possible to provide a byte[] which contains raw bytes of file name without decoding, so the user can employ other libs (e.g. Chardet) to process it later?

If you think it's okay, I am happy to do it and then open a PR :-)

Originally created by @xupefei on GitHub (Jul 15, 2017). Related to #163, #261 and #266. Since the string encoding in Zip archive is such a great pain, is it possible to provide a `byte[]` which contains raw bytes of file name without decoding, so the user can employ other libs (e.g. [Chardet](https://github.com/errepi/ude)) to process it later? If you think it's okay, I am happy to do it and then open a PR :-)
Author
Owner

@adamhathcock commented on GitHub (Jul 15, 2017):

Yeah, you should be able to do that. It’s just raw bytes before I try to do something.

A PR with Chardet sounds cool

@adamhathcock commented on GitHub (Jul 15, 2017): Yeah, you should be able to do that. It’s just raw bytes before I try to do something. A PR with Chardet sounds cool
Author
Owner

@adamhathcock commented on GitHub (Jul 15, 2017):

Using some custom decoder function on ArchiveEncoding with the changes in this PR would be good: https://github.com/adamhathcock/sharpcompress/pull/274

@adamhathcock commented on GitHub (Jul 15, 2017): Using some custom decoder function on ArchiveEncoding with the changes in this PR would be good: https://github.com/adamhathcock/sharpcompress/pull/274
Author
Owner

@adamhathcock commented on GitHub (Jul 17, 2017):

Solved with 0.18

@adamhathcock commented on GitHub (Jul 17, 2017): Solved with 0.18
Author
Owner

@xupefei commented on GitHub (Jul 19, 2017):

Just to mention, there is a better and newer library for detect encoding: https://github.com/CharsetDetector/UTF-unknown :P

@xupefei commented on GitHub (Jul 19, 2017): Just to mention, there is a better and newer library for detect encoding: https://github.com/CharsetDetector/UTF-unknown :P
Author
Owner

@adamhathcock commented on GitHub (Jul 19, 2017):

Hah. I had already started but this seems better and exactly the same as I'd do.

@adamhathcock commented on GitHub (Jul 19, 2017): Hah. I had already started but this seems better and exactly the same as I'd do.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/sharpcompress#215