Added ArchiveComment Property to ZipArchive#341
Conversation
| var entry = new DirectoryEndHeader(); | ||
| entry.Read(reader); | ||
|
|
||
| var comm = new ArchiveEncoding().Decode(entry.Comment); |
There was a problem hiding this comment.
This isn't going to work properly. The instance of the encoding object needs to be passed from options. Maybe don't worry about decoding it yet.
There was a problem hiding this comment.
Ok, i moved the decoding to ZipArchive.
I didn't want to change the type of Comment property on DirectoryEntryHeader.
So i converted the hex array to string and back.
dos-ise
left a comment
There was a problem hiding this comment.
Ok, i moved the decoding to ZipArchive.
I didn't want to change the type of Comment property on DirectoryEntryHeader.
So i converted the hex array to string and back.
|
Now that I look at the code here. Why is this line insufficient? I'm already decoding the comment there. Why are you turning that into a byte array and back? |
|
Because it does not work. Comment is string.empty after DirectoryEntryHeader.Read() has been executed The added test proves this. The property Comment is string on DirectoryEntryHeader. So the only way to get the decoding from SeekableZipHeaderFactory to ZipArchive is to save it temporarliy in the already existing property. Or do you have an better idea? |
Added ArchiveComment Property to ZipArchive