Skip to content

Commit

Permalink
Add SevenZipArchivePackSize implementation to the Electron Archive (a…
Browse files Browse the repository at this point in the history
…sar), ROMFS file system image and ZealFS file system image handlers for NanaZip.Codecs.
  • Loading branch information
MouriNaruto committed Feb 2, 2025
1 parent 2961b48 commit e6eb87b
Show file tree
Hide file tree
Showing 3 changed files with 21 additions and 0 deletions.
7 changes: 7 additions & 0 deletions NanaZip.Codecs/NanaZip.Codecs.Archive.ElectronAsar.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ namespace
{
{ SevenZipArchivePath, VT_BSTR },
{ SevenZipArchiveSize, VT_UI8 },
{ SevenZipArchivePackSize, VT_UI8 },
};

const std::size_t g_PropertyItemsCount =
Expand Down Expand Up @@ -335,6 +336,12 @@ namespace NanaZip::Codecs::Archive
Value->vt = VT_UI8;
break;
}
case SevenZipArchivePackSize:
{
Value->uhVal.QuadPart = Information.Size;
Value->vt = VT_UI8;
break;
}
default:
break;
}
Expand Down
7 changes: 7 additions & 0 deletions NanaZip.Codecs/NanaZip.Codecs.Archive.Romfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -35,6 +35,7 @@ namespace
{ SevenZipArchivePath, VT_BSTR },
{ SevenZipArchiveIsDirectory, VT_BOOL },
{ SevenZipArchiveSize, VT_UI8 },
{ SevenZipArchivePackSize, VT_UI8 },
{ SevenZipArchiveSymbolicLink, VT_BSTR },
{ SevenZipArchiveHardLink, VT_BSTR },
{ SevenZipArchiveInode, VT_UI8 },
Expand Down Expand Up @@ -452,6 +453,12 @@ namespace NanaZip::Codecs::Archive
Value->vt = VT_UI8;
break;
}
case SevenZipArchivePackSize:
{
Value->uhVal.QuadPart = Information.Size;
Value->vt = VT_UI8;
break;
}
case SevenZipArchiveSymbolicLink:
{
if (RomfsFileType::SymbolicLink == Information.Type)
Expand Down
7 changes: 7 additions & 0 deletions NanaZip.Codecs/NanaZip.Codecs.Archive.Zealfs.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,7 @@ namespace
{ SevenZipArchivePath, VT_BSTR },
{ SevenZipArchiveIsDirectory, VT_BOOL },
{ SevenZipArchiveSize, VT_UI8 },
{ SevenZipArchivePackSize, VT_UI8 },
{ SevenZipArchiveCreationTime, VT_FILETIME },
{ SevenZipArchiveInode, VT_UI8 },
};
Expand Down Expand Up @@ -454,6 +455,12 @@ namespace NanaZip::Codecs::Archive
Value->vt = VT_UI8;
break;
}
case SevenZipArchivePackSize:
{
Value->uhVal.QuadPart = this->ReadUInt16(&Information.Size);
Value->vt = VT_UI8;
break;
}
case SevenZipArchiveCreationTime:
{
Value->filetime = this->GetFileTime(Information);
Expand Down

0 comments on commit e6eb87b

Please sign in to comment.