Hi!
Thanks for awesome tool to work with zip! Unfortunately i ran into a problem when reading the zip64 file.
According with zip format specification fields in zip64 extended information record MUST only appear if the corresponding Local or Central directory record field is set to 0xFFFF or 0xFFFFFFFF
This issue may be fixed by change // ZIP64 Information block in ReadExtraInfo function to this:
if (extraId == 0x0001) // ZIP64 Information
{
int extraOffset = 4;
if (_zfe.FileSize == 0xFFFFFFFF)
{
_zfe.FileSize = BitConverter.ToInt64(buffer, pos + extraOffset);
extraOffset += 8;
}
if (_zfe.CompressedSize == 0xFFFFFFFF)
{
_zfe.CompressedSize = BitConverter.ToInt64(buffer, pos + extraOffset);
extraOffset += 8;
}
if (_zfe.HeaderOffset == 0xFFFFFFFF)
{
_zfe.HeaderOffset = BitConverter.ToInt64(buffer, pos + extraOffset);
}
}
And calculate zfe.FileOffset after invocation ReadExtraInfo.
Hi! Thanks for awesome tool to work with zip! Unfortunately i ran into a problem when reading the zip64 file.
According with zip format specification fields in zip64 extended information record
MUST only appear if the corresponding Local or Central directory record field is set to 0xFFFF or 0xFFFFFFFF
This issue may be fixed by change
// ZIP64 Information
block inReadExtraInfo
function to this:And calculate
zfe.FileOffset
after invocationReadExtraInfo
.But
CreateExtraInfo
should be rewrited to.