Skip to content

Conversation

@santisq
Copy link
Owner

@santisq santisq commented Dec 15, 2025

New Features & Enhancements

  • Native Zip Entry Objects

    Zip entries returned by Get-ZipEntry (and created by New-ZipEntry) are now backed directly by ICSharpCode.SharpZipLib.Zip.ZipEntry.
    This exposes additional useful properties on ZipEntryBase derived objects:

    • IsEncrypted (bool) – Indicates whether the entry is encrypted.
    • AESKeySize (int) – AES key size (0, 128, 192, or 256) if AES encryption is used.
    • CompressionMethod (ICSharpCode.SharpZipLib.Zip.CompressionMethod) – The actual compression method used.
    • Comment (string) – The entry comment.
    • Crc (long) – Cyclic redundancy check.
  • Support for Encrypted Zip Entries

    Get-ZipEntryContent and Expand-ZipEntry now fully support reading and extracting password-protected entries.
    A new common parameter has been added to both cmdlets:

    -Password <SecureString>
    • If an entry is encrypted and no password is provided, the cmdlets will securely prompt for one.
    • Examples and detailed guidance for handling encrypted entries have been added to the help documentation.
  • Documentation Improvements

    All cmdlet help files have been reviewed and updated for consistency and clarity.
    Significant enhancements to Get-ZipEntryContent and Expand-ZipEntry help:

    • Added dedicated examples demonstrating password-protected entry handling.
    • Updated parameter descriptions and notes for the new -Password parameter.
    • Improved phrasing, removed outdated example output, and ensured uniform formatting across the module.

@santisq santisq linked an issue Dec 15, 2025 that may be closed by this pull request
@santisq santisq self-assigned this Dec 15, 2025
@santisq santisq added documentation Improvements or additions to documentation enhancement New feature or request labels Dec 15, 2025
@santisq santisq changed the title 47 add password support for ziparchive Adds password support for zip entires Dec 15, 2025
@codecov
Copy link

codecov bot commented Dec 15, 2025

Codecov Report

❌ Patch coverage is 94.75410% with 16 lines in your changes missing coverage. Please review.
✅ Project coverage is 90.53%. Comparing base (e2bf5fe) to head (bcb7810).
⚠️ Report is 22 commits behind head on main.

Files with missing lines Patch % Lines
src/PSCompression/ZipEntryByteWriter.cs 85.71% 4 Missing and 1 partial ⚠️
...rc/PSCompression/Commands/ExpandZipEntryCommand.cs 60.00% 3 Missing and 1 partial ⚠️
...SCompression/Commands/GetZipEntryContentCommand.cs 73.33% 3 Missing and 1 partial ⚠️
src/PSCompression/ZipEntryCache.cs 33.33% 0 Missing and 2 partials ⚠️
.../PSCompression/Extensions/CompressionExtensions.cs 92.30% 0 Missing and 1 partial ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main      #49      +/-   ##
==========================================
+ Coverage   90.30%   90.53%   +0.23%     
==========================================
  Files          55       56       +1     
  Lines        1836     1839       +3     
  Branches      225      220       -5     
==========================================
+ Hits         1658     1665       +7     
- Misses        138      141       +3     
+ Partials       40       33       -7     
Flag Coverage Δ
PS_5.1 90.46% <94.35%> (+0.15%) ⬆️
PS_7_Linux 89.89% <93.06%> (+0.13%) ⬆️
PS_7_Windows 90.22% <93.06%> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@santisq santisq merged commit 5e89e7f into main Dec 16, 2025
7 checks passed
@santisq santisq deleted the 47-add-password-support-for-ziparchive branch December 16, 2025 18:24
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

documentation Improvements or additions to documentation enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Add password support for ZipArchive?

2 participants