├── .codacy.yaml ├── .editorconfig ├── .gitattributes ├── .github ├── CONTRIBUTING.md ├── ISSUE_TEMPLATE │ ├── bug.yml │ ├── config.yml │ └── feature_request.yml ├── PULL_REQUEST_TEMPLATE.md └── workflows │ ├── build-test.yml │ ├── codeql-analysis.yml │ ├── issue.yml │ └── release.yml ├── .gitignore ├── .globalconfig ├── .travis.yml ├── CONTRIBUTING.md ├── ICSharpCode.SharpZipLib.sln ├── LICENSE.txt ├── README.md ├── Rebracer.xml ├── SECURITY.md ├── appveyor.yml ├── appveyor.yml.old ├── assets ├── ICSharpCode.SharpZipLib.snk └── sharpziplib-nuget-256x256.png ├── benchmark ├── .globalconfig └── ICSharpCode.SharpZipLib.Benchmark │ ├── BZip2 │ └── BZip2InputStream.cs │ ├── Checksum │ ├── Adler32.cs │ ├── BZip2Crc.cs │ └── Crc32.cs │ ├── ICSharpCode.SharpZipLib.Benchmark.csproj │ ├── Program.cs │ ├── Tar │ ├── TarInputStream.cs │ └── TarOutputStream.cs │ └── Zip │ ├── ZipFile.cs │ ├── ZipInputStream.cs │ └── ZipOutputStream.cs ├── docs ├── Changes.txt ├── SharpZipLibCodeMap.dgml ├── future │ ├── ARCHIVES.TXT │ ├── FILEFMTS.DOC │ ├── FILEFMTS.LST │ ├── FILEFMTS_ARC.md │ ├── FILEFMTS_ARJ.md │ ├── FILEFMTS_DWC.md │ ├── FILEFMTS_GZIP.md │ ├── FILEFMTS_HA.md │ ├── FILEFMTS_HYP.md │ ├── FILEFMTS_Introduction.md │ ├── FILEFMTS_LBR.md │ ├── FILEFMTS_LZH.md │ ├── FILEFMTS_ZOO.md │ ├── FILE_ID.DIZ │ ├── README.md │ └── tar_15.html ├── help │ ├── .gitignore │ ├── BuildingHelpInfo.txt │ ├── api │ │ ├── .gitignore │ │ ├── index.md │ │ └── toc.yml │ ├── articles │ │ ├── intro.md │ │ └── toc.yml │ ├── docfx.json │ ├── index.md │ ├── serve.bat │ ├── template │ │ ├── logo.svg │ │ ├── partials │ │ │ └── navbar.tmpl.partial │ │ └── styles │ │ │ └── main.css │ └── toc.yml ├── nunit3-test-results-debug.xml ├── nunit3-test-results-release.xml ├── opencover-results-release.xml ├── opencover │ ├── ICSharpCode.SharpZipLib_Adler32.htm │ ├── ICSharpCode.SharpZipLib_BZip2.htm │ ├── ICSharpCode.SharpZipLib_BZip2Constants.htm │ ├── ICSharpCode.SharpZipLib_BZip2Crc.htm │ ├── ICSharpCode.SharpZipLib_BZip2Exception.htm │ ├── ICSharpCode.SharpZipLib_BZip2InputStream.htm │ ├── ICSharpCode.SharpZipLib_BZip2OutputStream.htm │ ├── ICSharpCode.SharpZipLib_BaseArchiveStorage.htm │ ├── ICSharpCode.SharpZipLib_CompletedFileHandler.htm │ ├── ICSharpCode.SharpZipLib_Crc32.htm │ ├── ICSharpCode.SharpZipLib_Deflater.htm │ ├── ICSharpCode.SharpZipLib_DeflaterConstants.htm │ ├── ICSharpCode.SharpZipLib_DeflaterEngine.htm │ ├── ICSharpCode.SharpZipLib_DeflaterHuffman.htm │ ├── ICSharpCode.SharpZipLib_DeflaterOutputStream.htm │ ├── ICSharpCode.SharpZipLib_DeflaterPending.htm │ ├── ICSharpCode.SharpZipLib_DescriptorData.htm │ ├── ICSharpCode.SharpZipLib_DirectoryEventArgs.htm │ ├── ICSharpCode.SharpZipLib_DirectoryFailureHandler.htm │ ├── ICSharpCode.SharpZipLib_DiskArchiveStorage.htm │ ├── ICSharpCode.SharpZipLib_DynamicDiskDataSource.htm │ ├── ICSharpCode.SharpZipLib_EntryPatchData.htm │ ├── ICSharpCode.SharpZipLib_ExtendedPathFilter.htm │ ├── ICSharpCode.SharpZipLib_ExtendedUnixData.htm │ ├── ICSharpCode.SharpZipLib_FastZip.htm │ ├── ICSharpCode.SharpZipLib_FastZipEvents.htm │ ├── ICSharpCode.SharpZipLib_FileFailureHandler.htm │ ├── ICSharpCode.SharpZipLib_FileSystemScanner.htm │ ├── ICSharpCode.SharpZipLib_GZip.htm │ ├── ICSharpCode.SharpZipLib_GZipConstants.htm │ ├── ICSharpCode.SharpZipLib_GZipException.htm │ ├── ICSharpCode.SharpZipLib_GZipInputStream.htm │ ├── ICSharpCode.SharpZipLib_GZipOutputStream.htm │ ├── ICSharpCode.SharpZipLib_Inflater.htm │ ├── ICSharpCode.SharpZipLib_InflaterDynHeader.htm │ ├── ICSharpCode.SharpZipLib_InflaterHuffmanTree.htm │ ├── ICSharpCode.SharpZipLib_InflaterInputBuffer.htm │ ├── ICSharpCode.SharpZipLib_InflaterInputStream.htm │ ├── ICSharpCode.SharpZipLib_InvalidHeaderException.htm │ ├── ICSharpCode.SharpZipLib_KeysRequiredEventArgs.htm │ ├── ICSharpCode.SharpZipLib_LzwConstants.htm │ ├── ICSharpCode.SharpZipLib_LzwException.htm │ ├── ICSharpCode.SharpZipLib_LzwInputStream.htm │ ├── ICSharpCode.SharpZipLib_MemoryArchiveStorage.htm │ ├── ICSharpCode.SharpZipLib_NTTaggedData.htm │ ├── ICSharpCode.SharpZipLib_NameAndSizeFilter.htm │ ├── ICSharpCode.SharpZipLib_NameFilter.htm │ ├── ICSharpCode.SharpZipLib_OutputWindow.htm │ ├── ICSharpCode.SharpZipLib_PathFilter.htm │ ├── ICSharpCode.SharpZipLib_PendingBuffer.htm │ ├── ICSharpCode.SharpZipLib_PkzipClassic.htm │ ├── ICSharpCode.SharpZipLib_PkzipClassicCryptoBase.htm │ ├── ICSharpCode.SharpZipLib_PkzipClassicDecryptCryptoTransform.htm │ ├── ICSharpCode.SharpZipLib_PkzipClassicEncryptCryptoTransform.htm │ ├── ICSharpCode.SharpZipLib_PkzipClassicManaged.htm │ ├── ICSharpCode.SharpZipLib_ProcessFileHandler.htm │ ├── ICSharpCode.SharpZipLib_ProgressEventArgs.htm │ ├── ICSharpCode.SharpZipLib_ProgressHandler.htm │ ├── ICSharpCode.SharpZipLib_ProgressMessageHandler.htm │ ├── ICSharpCode.SharpZipLib_RawTaggedData.htm │ ├── ICSharpCode.SharpZipLib_ScanEventArgs.htm │ ├── ICSharpCode.SharpZipLib_ScanFailureEventArgs.htm │ ├── ICSharpCode.SharpZipLib_SharpZipBaseException.htm │ ├── ICSharpCode.SharpZipLib_StaticDiskDataSource.htm │ ├── ICSharpCode.SharpZipLib_StreamManipulator.htm │ ├── ICSharpCode.SharpZipLib_StreamUtils.htm │ ├── ICSharpCode.SharpZipLib_TarArchive.htm │ ├── ICSharpCode.SharpZipLib_TarBuffer.htm │ ├── ICSharpCode.SharpZipLib_TarEntry.htm │ ├── ICSharpCode.SharpZipLib_TarException.htm │ ├── ICSharpCode.SharpZipLib_TarHeader.htm │ ├── ICSharpCode.SharpZipLib_TarInputStream.htm │ ├── ICSharpCode.SharpZipLib_TarOutputStream.htm │ ├── ICSharpCode.SharpZipLib_TestStatus.htm │ ├── ICSharpCode.SharpZipLib_WindowsNameTransform.htm │ ├── ICSharpCode.SharpZipLib_WindowsPathUtils.htm │ ├── ICSharpCode.SharpZipLib_ZipAESStream.htm │ ├── ICSharpCode.SharpZipLib_ZipAESTransform.htm │ ├── ICSharpCode.SharpZipLib_ZipConstants.htm │ ├── ICSharpCode.SharpZipLib_ZipEntry.htm │ ├── ICSharpCode.SharpZipLib_ZipEntryFactory.htm │ ├── ICSharpCode.SharpZipLib_ZipException.htm │ ├── ICSharpCode.SharpZipLib_ZipExtraData.htm │ ├── ICSharpCode.SharpZipLib_ZipFile.htm │ ├── ICSharpCode.SharpZipLib_ZipHelperStream.htm │ ├── ICSharpCode.SharpZipLib_ZipInputStream.htm │ ├── ICSharpCode.SharpZipLib_ZipNameTransform.htm │ ├── ICSharpCode.SharpZipLib_ZipOutputStream.htm │ ├── ICSharpCode.SharpZipLib_ZipTestResultHandler.htm │ ├── combined.js │ ├── index.htm │ ├── pic_branch0.png │ ├── pic_branch10.png │ ├── pic_branch100.png │ ├── pic_branch20.png │ ├── pic_branch30.png │ ├── pic_branch40.png │ ├── pic_branch50.png │ ├── pic_branch60.png │ ├── pic_branch70.png │ ├── pic_branch80.png │ ├── pic_branch90.png │ ├── pic_collapsed.png │ ├── pic_expanded.png │ ├── pic_pin_pinned.png │ ├── pic_pin_unpinned.png │ ├── pic_sortactive_asc.png │ ├── pic_sortactive_desc.png │ ├── pic_sortinactive.png │ └── report.css └── specification │ ├── README.md │ ├── algorithm.txt │ ├── appnote.txt │ ├── bzip2-manual-1.0.5.html │ ├── format.txt │ ├── rfc-deflate.txt │ ├── rfc-gzip.txt │ ├── rfc-zlib.txt │ ├── rfc1950.txt │ ├── rfc1951.txt │ ├── rfc1952.txt │ ├── tar_14.html │ └── tar_8.html ├── samples └── ICSharpCode.SharpZipLib.Samples │ ├── Samples.sln │ ├── cs │ ├── Cmd_BZip2 │ │ ├── Cmd_BZip2.cs │ │ ├── Cmd_BZip2.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── app.config │ │ └── readme.txt │ ├── Cmd_Checksum │ │ ├── Cmd_Checksum.cs │ │ ├── Cmd_Checksum.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── app.config │ │ └── readme.txt │ ├── Cmd_GZip │ │ ├── Cmd_GZip.cs │ │ ├── Cmd_GZip.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── app.config │ │ └── readme.txt │ ├── Cmd_Tar │ │ ├── Cmd_Tar.cs │ │ ├── Cmd_Tar.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── app.config │ ├── Cmd_ZipInfo │ │ ├── Cmd_ZipInfo.cs │ │ ├── Cmd_ZipInfo.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── app.config │ │ └── readme.txt │ ├── CreateZipFile │ │ ├── CreateZipFile.cs │ │ ├── CreateZipFile.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── app.config │ │ └── readme.txt │ ├── FastZip │ │ ├── FastZip.cs │ │ ├── FastZip.csproj │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ └── app.config │ ├── SampleAssemblyInfo.cs │ ├── sz │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── app.config │ │ ├── sz.cs │ │ └── sz.csproj │ ├── unzipfile │ │ ├── App.config │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── UnZipFile.cs │ │ ├── readme.txt │ │ └── unzipfile.csproj │ ├── viewzipfile │ │ ├── App.config │ │ ├── Properties │ │ │ └── AssemblyInfo.cs │ │ ├── ViewZipFile.cs │ │ ├── readme.txt │ │ └── viewzipfile.csproj │ └── zf │ │ ├── Properties │ │ └── AssemblyInfo.cs │ │ ├── app.config │ │ ├── zf.cs │ │ └── zf.csproj │ └── vb │ ├── CreateZipFile │ ├── CreateZipFile.MainForm.resources │ ├── CreateZipFile.vbproj │ ├── CreateZipFileForm.resx │ ├── CreateZipFileForm.vb │ ├── MainForm.resources │ ├── My Project │ │ └── AssemblyInfo.vb │ └── app.config │ ├── SampleAssemblyInfo.vb │ ├── WpfCreateZipFile │ ├── App.config │ ├── Application.xaml │ ├── Application.xaml.vb │ ├── My Project │ │ ├── AssemblyInfo.vb │ │ ├── MyExtensions │ │ │ └── MyWpfExtension.vb │ │ ├── Resources.Designer.vb │ │ ├── Resources.resx │ │ ├── Settings.Designer.vb │ │ ├── Settings.settings │ │ └── app.manifest │ ├── WpfCreateZipFile.vbproj │ ├── WpfCreateZipFileWindow.xaml │ └── WpfCreateZipFileWindow.xaml.vb │ ├── minibzip2 │ ├── MiniBzip2Form.resx │ ├── MiniBzip2Form.vb │ ├── My Project │ │ ├── Application.Designer.vb │ │ ├── Application.myapp │ │ ├── AssemblyInfo.vb │ │ ├── Resources.Designer.vb │ │ ├── Resources.resx │ │ └── app.manifest │ ├── app.config │ └── minibzip2.vbproj │ ├── viewzipfile │ ├── My Project │ │ └── AssemblyInfo.vb │ ├── ViewZipFileForm.resx │ ├── ViewZipFileForm.vb │ ├── app.config │ └── viewzipfile.vbproj │ └── zipfiletest │ ├── Main.resx │ ├── Main.vb │ ├── My Project │ └── AssemblyInfo.vb │ ├── app.config │ └── zipfiletest.vbproj ├── src └── ICSharpCode.SharpZipLib │ ├── AssemblyInfo.cs │ ├── BZip2 │ ├── BZip2.cs │ ├── BZip2Constants.cs │ ├── BZip2Exception.cs │ ├── BZip2InputStream.cs │ └── BZip2OutputStream.cs │ ├── Checksum │ ├── Adler32.cs │ ├── BZip2Crc.cs │ ├── Crc32.cs │ ├── CrcUtilities.cs │ └── IChecksum.cs │ ├── Core │ ├── ByteOrderUtils.cs │ ├── EmptyRefs.cs │ ├── ExactMemoryPool.cs │ ├── Exceptions │ │ ├── SharpZipBaseException.cs │ │ ├── StreamDecodingException.cs │ │ ├── StreamUnsupportedException.cs │ │ ├── UnexpectedEndOfStreamException.cs │ │ └── ValueOutOfRangeException.cs │ ├── FileSystemScanner.cs │ ├── INameTransform.cs │ ├── IScanFilter.cs │ ├── InflaterPool.cs │ ├── InvalidNameException.cs │ ├── NameFilter.cs │ ├── PathFilter.cs │ ├── PathUtils.cs │ ├── StreamUtils.cs │ └── StringBuilderPool.cs │ ├── Encryption │ ├── PkzipClassic.cs │ ├── ZipAESStream.cs │ └── ZipAESTransform.cs │ ├── GZip │ ├── GZip.cs │ ├── GZipConstants.cs │ ├── GZipException.cs │ ├── GzipInputStream.cs │ └── GzipOutputStream.cs │ ├── ICSharpCode.SharpZipLib.csproj │ ├── Lzw │ ├── LzwConstants.cs │ ├── LzwException.cs │ └── LzwInputStream.cs │ ├── SharpZipLibOptions.cs │ ├── Tar │ ├── InvalidHeaderException.cs │ ├── TarArchive.cs │ ├── TarBuffer.cs │ ├── TarEntry.cs │ ├── TarException.cs │ ├── TarExtendedHeaderReader.cs │ ├── TarHeader.cs │ ├── TarInputStream.cs │ ├── TarOutputStream.cs │ └── TarStringExtension.cs │ └── Zip │ ├── Compression │ ├── Deflater.cs │ ├── DeflaterConstants.cs │ ├── DeflaterEngine.cs │ ├── DeflaterHuffman.cs │ ├── DeflaterPending.cs │ ├── Inflater.cs │ ├── InflaterDynHeader.cs │ ├── InflaterHuffmanTree.cs │ ├── PendingBuffer.cs │ ├── PooledInflater.cs │ └── Streams │ │ ├── DeflaterOutputStream.cs │ │ ├── InflaterInputStream.cs │ │ ├── OutputWindow.cs │ │ └── StreamManipulator.cs │ ├── FastZip.cs │ ├── IEntryFactory.cs │ ├── WindowsNameTransform.cs │ ├── ZipConstants.cs │ ├── ZipEncryptionMethod.cs │ ├── ZipEntry.cs │ ├── ZipEntryExtensions.cs │ ├── ZipEntryFactory.cs │ ├── ZipException.cs │ ├── ZipExtraData.cs │ ├── ZipFile.cs │ ├── ZipFormat.cs │ ├── ZipHelperStream.cs │ ├── ZipInputStream.cs │ ├── ZipNameTransform.cs │ ├── ZipOutputStream.cs │ └── ZipStrings.cs ├── test ├── .globalconfig └── ICSharpCode.SharpZipLib.Tests │ ├── BZip2 │ └── Bzip2Tests.cs │ ├── Base │ └── InflaterDeflaterTests.cs │ ├── Checksum │ └── ChecksumTests.cs │ ├── Core │ ├── ByteOrderUtilsTests.cs │ ├── CoreTests.cs │ └── StringBuilderPoolTests.cs │ ├── GZip │ ├── GZipAsyncTests.cs │ └── GZipTests.cs │ ├── ICSharpCode.SharpZipLib.Tests.csproj │ ├── Lzw │ └── LzwTests.cs │ ├── Serialization │ └── SerializationTests.cs │ ├── Tar │ ├── TarArchiveTests.cs │ ├── TarBufferTests.cs │ ├── TarInputStreamTests.cs │ └── TarTests.cs │ ├── TestSupport │ ├── PerformanceTesting.cs │ ├── RingBuffer.cs │ ├── SevenZip.cs │ ├── Streams.cs │ ├── StringTesting.cs │ ├── ThreadEx.cs │ ├── Utils.cs │ └── ZipTesting.cs │ ├── Zip │ ├── FastZipHandling.cs │ ├── GeneralHandling.cs │ ├── PassthroughTests.cs │ ├── StreamHandling.cs │ ├── WindowsNameTransformHandling.cs │ ├── ZipCorruptionHandling.cs │ ├── ZipEncryptionHandling.cs │ ├── ZipEntryFactoryHandling.cs │ ├── ZipEntryHandling.cs │ ├── ZipExtraDataHandling.cs │ ├── ZipFileHandling.cs │ ├── ZipNameTransformHandling.cs │ ├── ZipStreamAsyncTests.cs │ ├── ZipStringsTests.cs │ └── ZipTests.cs │ └── app.config └── tools ├── appveyor-docfx-build.ps1 ├── appveyor-docfx-init.ps1 ├── appveyor-install.ps1 ├── appveyor-test.ps1 ├── old ├── ICSharpCode.SharpZipLib.nuspec ├── ICSharpCode.SharpZipLib.version ├── install-fxmicroframework-43-44.ps1 ├── installGAC.bat ├── run-appveyor-build.ps1 ├── run-nunit3-tests-debug.cmd ├── run-nunit3-tests-release.cmd ├── run-opencover.cmd ├── run-reportgenerator.cmd ├── sharpziplib.pc └── uninstallGAC.bat ├── release-notes ├── README.md ├── release-notes-md.ejs ├── release-notes.js └── release-notes.json └── test-scripts.ps1 /.codacy.yaml: -------------------------------------------------------------------------------- 1 | --- 2 | exclude_paths: 3 | - 'docs/**/*' 4 | -------------------------------------------------------------------------------- /.editorconfig: -------------------------------------------------------------------------------- 1 | # editorconfig.org 2 | 3 | # top-most EditorConfig file 4 | root = true 5 | 6 | # Default settings: 7 | # A newline ending every file 8 | # Use 4 spaces as indentation 9 | [*] 10 | insert_final_newline = true 11 | indent_style = tab 12 | indent_size = 4 13 | 14 | # C++ Files 15 | [*.{cpp,h,in}] 16 | curly_bracket_next_line = true 17 | indent_brace_style = Allman 18 | 19 | # Xml project files 20 | [*.{csproj,vcxproj,vcxproj.filters,proj,nativeproj,locproj}] 21 | indent_size = 2 22 | 23 | # Xml files 24 | [*.{xml,stylecop,resx,ruleset}] 25 | indent_size = 2 26 | 27 | # Xml config files 28 | [*.{props,targets,config,nuspec}] 29 | indent_size = 2 30 | 31 | # Shell scripts 32 | [*.sh] 33 | end_of_line = lf 34 | [*.{cmd, bat}] 35 | end_of_line = crlf 36 | 37 | [*.yml] 38 | indent_style = space 39 | indent_size = 2 40 | -------------------------------------------------------------------------------- /.gitattributes: -------------------------------------------------------------------------------- 1 | ############################################################################### 2 | # Set default behavior to automatically normalize line endings. 3 | ############################################################################### 4 | * text=auto 5 | 6 | ############################################################################### 7 | # Set default behavior for command prompt diff. 8 | # 9 | # This is need for earlier builds of msysgit that does not have it on by 10 | # default for csharp files. 11 | # Note: This is only used by command line 12 | ############################################################################### 13 | #*.cs diff=csharp 14 | 15 | ############################################################################### 16 | # Set the merge driver for project and solution files 17 | # 18 | # Merging from the command prompt will add diff markers to the files if there 19 | # are conflicts (Merging from VS is not affected by the settings below, in VS 20 | # the diff markers are never inserted). Diff markers may cause the following 21 | # file extensions to fail to load in VS. An alternative would be to treat 22 | # these files as binary and thus will always conflict and require user 23 | # intervention with every merge. To do so, just uncomment the entries below 24 | ############################################################################### 25 | #*.sln merge=binary 26 | #*.csproj merge=binary 27 | #*.vbproj merge=binary 28 | #*.vcxproj merge=binary 29 | #*.vcproj merge=binary 30 | #*.dbproj merge=binary 31 | #*.fsproj merge=binary 32 | #*.lsproj merge=binary 33 | #*.wixproj merge=binary 34 | #*.modelproj merge=binary 35 | #*.sqlproj merge=binary 36 | #*.wwaproj merge=binary 37 | 38 | ############################################################################### 39 | # behavior for image files 40 | # 41 | # image files are treated as binary by default. 42 | ############################################################################### 43 | #*.jpg binary 44 | #*.png binary 45 | #*.gif binary 46 | 47 | ############################################################################### 48 | # diff behavior for common document formats 49 | # 50 | # Convert binary document formats to text before diffing them. This feature 51 | # is only available from the command line. Turn it on by uncommenting the 52 | # entries below. 53 | ############################################################################### 54 | #*.doc diff=astextplain 55 | #*.DOC diff=astextplain 56 | #*.docx diff=astextplain 57 | #*.DOCX diff=astextplain 58 | #*.dot diff=astextplain 59 | #*.DOT diff=astextplain 60 | #*.pdf diff=astextplain 61 | #*.PDF diff=astextplain 62 | #*.rtf diff=astextplain 63 | #*.RTF diff=astextplain 64 | 65 | # Force bash scripts to always use lf line endings so that if a repo is accessed 66 | # in Unix via a file share from Windows, the scripts will work. 67 | *.sh text eol=lf 68 | -------------------------------------------------------------------------------- /.github/CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to SharpZipLib 2 | 3 | Thanks for helping to improve SharpZipLib. 4 | 5 | In order for your changes to be accepted you can either sign the [Joint Copyright Assignment](http://www.icsharpcode.net/TechNotes/JointCopyrightAssignment.pdf) or add the following statement to your pull request: 6 | 7 | _I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License._ 8 | 9 | Unless we have a Joint Copyright Agreement on file or this statement is in your pull request, we cannot accept it. 10 | 11 | More information is available on [joining the team](https://github.com/icsharpcode/SharpDevelop/wiki/Joining-the-Team). 12 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/bug.yml: -------------------------------------------------------------------------------- 1 | name: 🐛 Bug report 2 | description: Create a report to help us improve 3 | labels: ["bug"] 4 | 5 | body: 6 | - type: textarea 7 | id: description 8 | attributes: 9 | label: Describe the bug 10 | description: A clear and concise description of what the bug is 11 | validations: 12 | required: true 13 | 14 | - type: input 15 | id: reproduce-code 16 | attributes: 17 | description: | 18 | If possible, the best way to display an issue is by making a reproducable code snippet available at jsfiddle. 19 | Create a dotnet fiddle which reproduces your issue. You can use [this template](https://p1k.se/sharpziplib-repro) or [create a new one](https://dotnetfiddle.net/). 20 | placeholder: https://dotnetfiddle.net/r39r0c0d3 21 | label: Reproduction Code 22 | 23 | - type: textarea 24 | id: reproduce-steps 25 | attributes: 26 | label: Steps to reproduce 27 | description: Steps to reproduce the behavior 28 | placeholder: | 29 | 1. Go to '...' 30 | 2. Click on '....' 31 | 3. Scroll down to '....' 32 | 4. See error 33 | validations: 34 | required: true 35 | 36 | - id: expected 37 | type: textarea 38 | attributes: 39 | label: Expected behavior 40 | description: A clear and concise description of what you expected to happen. 41 | validations: 42 | required: true 43 | 44 | - id: operating-system 45 | type: dropdown 46 | attributes: 47 | label: Operating System 48 | multiple: true 49 | options: 50 | - Windows 51 | - macOS 52 | - Linux 53 | validations: 54 | required: false 55 | 56 | - id: framework 57 | type: dropdown 58 | attributes: 59 | label: Framework Version 60 | multiple: true 61 | options: 62 | - .NET 7 63 | - .NET 6 64 | - .NET 5 65 | - .NET Core v3 and earlier 66 | - .NET Framework 4.x 67 | - Unity 68 | - Other 69 | validations: 70 | required: false 71 | 72 | - id: tags 73 | type: dropdown 74 | attributes: 75 | label: Tags 76 | description: What areas are your issue related to? 77 | multiple: true 78 | options: 79 | - ZIP 80 | - GZip 81 | - Tar 82 | - BZip2 83 | - Encoding 84 | - Encryption 85 | - Documentation 86 | - Async 87 | - Performance 88 | 89 | - type: textarea 90 | attributes: 91 | label: Additional context 92 | description: Add any other context about the problem here. 93 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/config.yml: -------------------------------------------------------------------------------- 1 | blank_issues_enabled: false 2 | contact_links: 3 | - name: Ask a question 4 | url: https://github.com/icsharpcode/SharpZipLib/discussions/new?category=q-a 5 | about: Post any questions in QA discussions instead of creating an issue 6 | - name: Discuss 7 | url: https://github.com/icsharpcode/SharpZipLib/discussions/new 8 | about: Discuss with other community members 9 | -------------------------------------------------------------------------------- /.github/ISSUE_TEMPLATE/feature_request.yml: -------------------------------------------------------------------------------- 1 | name: 💡 Feature request 2 | description: Have a new idea/feature ? Please suggest! 3 | labels: ["enhancement"] 4 | body: 5 | - type: textarea 6 | id: description 7 | attributes: 8 | label: Is your feature request related to a problem? Please describe. 9 | description: A clear and concise description of what the problem is. Ex. I'm always frustrated when [...] 10 | validations: 11 | required: true 12 | 13 | - type: textarea 14 | id: solution 15 | attributes: 16 | label: Describe the solution you'd like 17 | description: A clear and concise description of what you want to happen. 18 | validations: 19 | required: true 20 | 21 | - type: textarea 22 | id: alternatives 23 | attributes: 24 | label: Describe alternatives you've considered 25 | description: A clear and concise description of any alternative solutions or features you've considered. 26 | validations: 27 | required: true 28 | 29 | - id: tags 30 | type: dropdown 31 | attributes: 32 | label: Tags 33 | description: What areas are your feature request related to? 34 | multiple: true 35 | options: 36 | - ZIP 37 | - GZip 38 | - Tar 39 | - BZip2 40 | - Encoding 41 | - Encryption 42 | - Documentation 43 | - Async 44 | - Performance 45 | 46 | - type: textarea 47 | id: extrainfo 48 | attributes: 49 | label: Additional context 50 | description: Add any other context or screenshots about the feature request here. 51 | validations: 52 | required: false 53 | -------------------------------------------------------------------------------- /.github/PULL_REQUEST_TEMPLATE.md: -------------------------------------------------------------------------------- 1 | 4 | _I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License._ 5 | -------------------------------------------------------------------------------- /.github/workflows/codeql-analysis.yml: -------------------------------------------------------------------------------- 1 | # For most projects, this workflow file will not need changing; you simply need 2 | # to commit it to your repository. 3 | # 4 | # You may wish to alter this file to override the set of languages analyzed, 5 | # or to provide custom queries or build logic. 6 | # 7 | # ******** NOTE ******** 8 | # We have attempted to detect the languages in your repository. Please check 9 | # the `language` matrix defined below to confirm you have the correct set of 10 | # supported CodeQL languages. 11 | # 12 | name: "CodeQL" 13 | 14 | on: 15 | push: 16 | branches: [ master ] 17 | pull_request: 18 | # The branches below must be a subset of the branches above 19 | branches: [ master ] 20 | schedule: 21 | - cron: '40 7 * * 4' 22 | 23 | jobs: 24 | analyze: 25 | name: Analyze 26 | runs-on: ubuntu-latest 27 | permissions: 28 | actions: read 29 | contents: read 30 | security-events: write 31 | 32 | strategy: 33 | fail-fast: false 34 | matrix: 35 | language: [ 'csharp' ] 36 | # CodeQL supports [ 'cpp', 'csharp', 'go', 'java', 'javascript', 'python' ] 37 | # Learn more: 38 | # https://docs.github.com/en/free-pro-team@latest/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#changing-the-languages-that-are-analyzed 39 | 40 | steps: 41 | - name: Checkout repository 42 | uses: actions/checkout@v3 43 | 44 | # Initializes the CodeQL tools for scanning. 45 | - name: Initialize CodeQL 46 | uses: github/codeql-action/init@v2 47 | with: 48 | languages: ${{ matrix.language }} 49 | # If you wish to specify custom queries, you can do so here or in a config file. 50 | # By default, queries listed here will override any specified in a config file. 51 | # Prefix the list here with "+" to use these queries and those in the config file. 52 | # queries: ./path/to/local/query, your-org/your-repo/queries@main 53 | 54 | # Autobuild attempts to build any compiled languages (C/C++, C#, or Java). 55 | # If this step fails, then you should remove it and run the build manually (see below) 56 | - name: Autobuild 57 | uses: github/codeql-action/autobuild@v2 58 | 59 | # ℹ️ Command-line programs to run using the OS shell. 60 | # 📚 https://git.io/JvXDl 61 | 62 | # ✏️ If the Autobuild fails above, remove it and uncomment the following three lines 63 | # and modify them (or add more) to build your code if your project 64 | # uses a compiled language 65 | 66 | #- run: | 67 | # make bootstrap 68 | # make release 69 | 70 | - name: Perform CodeQL Analysis 71 | uses: github/codeql-action/analyze@v2 72 | -------------------------------------------------------------------------------- /.github/workflows/issue.yml: -------------------------------------------------------------------------------- 1 | name: Apply labels from issue 2 | 3 | on: 4 | issues: 5 | types: [opened, edited] 6 | 7 | jobs: 8 | Process_Issue: 9 | runs-on: ubuntu-latest 10 | steps: 11 | - name: Parse Issue Forms Body 12 | id: parse 13 | uses: zentered/issue-forms-body-parser@v1.4.3 14 | - name: Apply labels from tags 15 | uses: actions/github-script@v6 16 | env: 17 | PARSED_DATA: "${{ steps.parse.outputs.data }}" 18 | with: 19 | script: | 20 | const parsed = JSON.parse(process.env["PARSED_DATA"]); 21 | const tags = parsed.tags.text; 22 | console.log('Parsed tags:', tags); 23 | const labels = tags.split(',').map( t => t.trim().toLowerCase() ); 24 | console.log('Applying labels:', labels); 25 | github.rest.issues.addLabels({ 26 | issue_number: context.issue.number, 27 | owner: context.repo.owner, 28 | repo: context.repo.repo, 29 | labels, 30 | }) 31 | -------------------------------------------------------------------------------- /.github/workflows/release.yml: -------------------------------------------------------------------------------- 1 | # Workflow to execute when a new version is released 2 | name: Release 3 | 4 | on: 5 | release: 6 | 7 | # Used for testing and manual execution 8 | workflow_dispatch: 9 | inputs: 10 | tag: 11 | description: 'Tag Ref' 12 | required: true 13 | 14 | jobs: 15 | build: 16 | runs-on: windows-latest 17 | name: Generate DocFX documentation 18 | steps: 19 | - uses: actions/checkout@v3 20 | with: 21 | ref: ${{ github.events.inputs.tag }} 22 | 23 | - name: Setup .NET 24 | uses: actions/setup-dotnet@v1 25 | with: 26 | dotnet-version: '6.0.x' 27 | 28 | - name: Build project 29 | run: dotnet build -f netstandard2.0 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj 30 | 31 | - name: Install docfx 32 | run: choco install docfx 33 | 34 | - name: Build Documentation 35 | run: docfx docs/help/docfx.json --warningsAsErrors 36 | 37 | - name: Upload documentation as artifact 38 | uses: actions/upload-artifact@v2 39 | with: 40 | name: site 41 | path: docs/help/_site 42 | 43 | deploy: 44 | needs: [build] # The second job must depend on the first one to complete before running and uses ubuntu-latest instead of windows. 45 | runs-on: ubuntu-latest 46 | name: Update github pages docs 47 | steps: 48 | - name: Checkout 49 | uses: actions/checkout@v3 50 | 51 | - name: Download Artifacts # The built project is downloaded into the 'site' folder. 52 | uses: actions/download-artifact@v1 53 | with: 54 | name: site 55 | 56 | - name: Publish documentation to Github Pages 57 | uses: JamesIves/github-pages-deploy-action@v4 58 | with: 59 | token: ${{ secrets.GITHUB_TOKEN }} 60 | branch: gh-pages 61 | folder: site 62 | target-folder: help 63 | clean: false 64 | -------------------------------------------------------------------------------- /.globalconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | global_level = 1 3 | dotnet_diagnostic.CA2007.severity = warning 4 | -------------------------------------------------------------------------------- /.travis.yml: -------------------------------------------------------------------------------- 1 | language: csharp 2 | solution: ICSharpCode.SharpZipLib.sln 3 | 4 | #matrix: 5 | # include: 6 | # - mono: latest 7 | # - mono: none 8 | # env: NETCORE=1 9 | # dotnet: 2.1 10 | mono: none 11 | dotnet: 2.1 12 | os: linux 13 | install: 14 | - dotnet restore 15 | # - nuget restore ICSharpCode.SharpZipLib.sln 16 | # - nuget install NUnit.Console -Version 3.8.0 -OutputDirectory _testRunner 17 | script: 18 | - dotnet build -f netstandard2.0 src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj 19 | - dotnet run -c Debug -f netcoreapp2 -p test/ICSharpCode.SharpZipLib.TestBootstrapper/ICSharpCode.SharpZipLib.TestBootstrapper.csproj -- --where "class !~ WindowsNameTransformHandling & test !~ ZipEntryFactoryHandling.CreatedValues & test !~ ZipNameTransformHandling.FilenameCleaning" --result=docs/nunit3-test-results-debug.xml 20 | - dotnet run -c Release -f netcoreapp2 -p test/ICSharpCode.SharpZipLib.TestBootstrapper/ICSharpCode.SharpZipLib.TestBootstrapper.csproj -- --where "class !~ WindowsNameTransformHandling & test !~ ZipEntryFactoryHandling.CreatedValues & test !~ ZipNameTransformHandling.FilenameCleaning" --result=docs\nunit3-test-results-release.xml 21 | # - dotnet test test/ICSharpCode.SharpZipLib.Tests/ICSharpCode.SharpZipLib.Tests.csproj 22 | # - xbuild /p:Configuration=Release ICSharpCode.SharpZipLib.sln 23 | # - mono ./packages/NUnit.ConsoleRunner.3.2.1/tools/nunit3-console.exe --framework=mono-4.0 --labels=All --result=./Documentation/nunit3-test-results-travis.xml ./bin/Release/ICSharpCode.SharpZipLib.Tests.dll 24 | after_script: 25 | - dotnet pack -f netstandard2.0 -o _dist/ src/ICSharpCode.SharpZipLib/ICSharpCode.SharpZipLib.csproj 26 | #cache: 27 | # directories: 28 | # - bin 29 | # - Documentation 30 | #deploy: 31 | # provider: releases 32 | # api_key: "GITHUB OAUTH TOKEN" 33 | # file: 34 | # - "bin/Release/ICSharpCode.SharpZipLib.nupkg" 35 | # - "Documentation/nunit3-test-results-travis.xml" 36 | # skip_cleanup: true 37 | # on: 38 | # tags: true 39 | -------------------------------------------------------------------------------- /CONTRIBUTING.md: -------------------------------------------------------------------------------- 1 | # Contributing to SharpZipLib 2 | 3 | Thanks for helping to improve SharpZipLib. 4 | 5 | In order for your changes to be accepted you can either sign the [Joint Copyright Assignment](http://www.icsharpcode.net/TechNotes/JointCopyrightAssignment.pdf) or add the following statement to your pull request: 6 | 7 | _I certify that I own, and have sufficient rights to contribute, all source code and related material intended to be compiled or integrated with the source code for the SharpZipLib open source product (the "Contribution"). My Contribution is licensed under the MIT License._ 8 | 9 | Unless we have a Joint Copyright Agreement on file or this statement is in your pull request, we cannot accept it. 10 | 11 | More information is available on [joining the team](https://github.com/icsharpcode/SharpDevelop/wiki/Joining-the-Team). 12 | -------------------------------------------------------------------------------- /ICSharpCode.SharpZipLib.sln: -------------------------------------------------------------------------------- 1 |  2 | Microsoft Visual Studio Solution File, Format Version 12.00 3 | # Visual Studio Version 16 4 | VisualStudioVersion = 16.0.28705.295 5 | MinimumVisualStudioVersion = 10.0.40219.1 6 | Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = "Solution Configuration", "Solution Configuration", "{F1097E98-4DEB-4A0A-81EE-5CEC667EBDF0}" 7 | ProjectSection(SolutionItems) = preProject 8 | .editorconfig = .editorconfig 9 | .gitattributes = .gitattributes 10 | .gitignore = .gitignore 11 | Rebracer.xml = Rebracer.xml 12 | EndProjectSection 13 | EndProject 14 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.SharpZipLib", "src\ICSharpCode.SharpZipLib\ICSharpCode.SharpZipLib.csproj", "{C53BEB8A-0989-43A7-B3EC-F7028749FA71}" 15 | EndProject 16 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.SharpZipLib.Tests", "test\ICSharpCode.SharpZipLib.Tests\ICSharpCode.SharpZipLib.Tests.csproj", "{82211166-9C45-4603-8E3A-2CA2EFFCBC26}" 17 | EndProject 18 | Project("{9A19103F-16F7-4668-BE54-9A1E7A4F7556}") = "ICSharpCode.SharpZipLib.Benchmark", "benchmark\ICSharpCode.SharpZipLib.Benchmark\ICSharpCode.SharpZipLib.Benchmark.csproj", "{C51E638B-DDD0-48B6-A6BD-EBC4E6A104C7}" 19 | EndProject 20 | Global 21 | GlobalSection(SolutionConfigurationPlatforms) = preSolution 22 | Debug|Any CPU = Debug|Any CPU 23 | Release|Any CPU = Release|Any CPU 24 | EndGlobalSection 25 | GlobalSection(ProjectConfigurationPlatforms) = postSolution 26 | {C53BEB8A-0989-43A7-B3EC-F7028749FA71}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 27 | {C53BEB8A-0989-43A7-B3EC-F7028749FA71}.Debug|Any CPU.Build.0 = Debug|Any CPU 28 | {C53BEB8A-0989-43A7-B3EC-F7028749FA71}.Release|Any CPU.ActiveCfg = Release|Any CPU 29 | {C53BEB8A-0989-43A7-B3EC-F7028749FA71}.Release|Any CPU.Build.0 = Release|Any CPU 30 | {82211166-9C45-4603-8E3A-2CA2EFFCBC26}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 31 | {82211166-9C45-4603-8E3A-2CA2EFFCBC26}.Debug|Any CPU.Build.0 = Debug|Any CPU 32 | {82211166-9C45-4603-8E3A-2CA2EFFCBC26}.Release|Any CPU.ActiveCfg = Release|Any CPU 33 | {82211166-9C45-4603-8E3A-2CA2EFFCBC26}.Release|Any CPU.Build.0 = Release|Any CPU 34 | {C51E638B-DDD0-48B6-A6BD-EBC4E6A104C7}.Debug|Any CPU.ActiveCfg = Debug|Any CPU 35 | {C51E638B-DDD0-48B6-A6BD-EBC4E6A104C7}.Debug|Any CPU.Build.0 = Debug|Any CPU 36 | {C51E638B-DDD0-48B6-A6BD-EBC4E6A104C7}.Release|Any CPU.ActiveCfg = Release|Any CPU 37 | {C51E638B-DDD0-48B6-A6BD-EBC4E6A104C7}.Release|Any CPU.Build.0 = Release|Any CPU 38 | EndGlobalSection 39 | GlobalSection(SolutionProperties) = preSolution 40 | HideSolutionNode = FALSE 41 | EndGlobalSection 42 | GlobalSection(ExtensibilityGlobals) = postSolution 43 | SolutionGuid = {0A049193-65F8-49AF-82CB-75D42563DA16} 44 | EndGlobalSection 45 | EndGlobal 46 | -------------------------------------------------------------------------------- /LICENSE.txt: -------------------------------------------------------------------------------- 1 | Copyright © 2000-2018 SharpZipLib Contributors 2 | 3 | Permission is hereby granted, free of charge, to any person obtaining a copy of this 4 | software and associated documentation files (the "Software"), to deal in the Software 5 | without restriction, including without limitation the rights to use, copy, modify, merge, 6 | publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons 7 | to whom the Software is furnished to do so, subject to the following conditions: 8 | 9 | The above copyright notice and this permission notice shall be included in all copies or 10 | substantial portions of the Software. 11 | 12 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, 13 | INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR 14 | PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE 15 | FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR 16 | OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 17 | DEALINGS IN THE SOFTWARE. 18 | -------------------------------------------------------------------------------- /SECURITY.md: -------------------------------------------------------------------------------- 1 | # Security Policy 2 | 3 | ## Supported Versions 4 | 5 | | Version | Supported | 6 | | ------- | ------------------ | 7 | | 1.3.x | :white_check_mark: | 8 | | < 1.3 | :x: | 9 | 10 | ## Reporting a Vulnerability 11 | 12 | Send an e-mail to sharpziplib@containrrr.dev 13 | -------------------------------------------------------------------------------- /appveyor.yml: -------------------------------------------------------------------------------- 1 | version: '{build}' 2 | image: Visual Studio 2019 3 | configuration: 4 | - Debug 5 | - Release 6 | dotnet_csproj: 7 | patch: true 8 | file: '**\*.csproj' 9 | version: $(VERSION) 10 | package_version: $(VERSION) 11 | assembly_version: $(BIN_VERSION) 12 | file_version: $(BIN_VERSION) 13 | informational_version: $(VERSION) 14 | install: 15 | - ps: tools/appveyor-install.ps1 16 | nuget: 17 | project_feed: true 18 | disable_publish_on_pr: true 19 | before_build: 20 | - ps: nuget restore ICSharpCode.SharpZipLib.sln 21 | - ps: .\tools\appveyor-docfx-init.ps1 22 | build: 23 | project: ICSharpCode.SharpZipLib.sln 24 | publish_nuget: true 25 | publish_nuget_symbols: true 26 | verbosity: normal 27 | after_build: 28 | - ps: .\tools\appveyor-docfx-build.ps1 29 | test_script: 30 | - ps: tools\appveyor-test.ps1 31 | artifacts: 32 | - path: docs\help\_site 33 | type: zip 34 | name: Documentation 35 | -------------------------------------------------------------------------------- /appveyor.yml.old: -------------------------------------------------------------------------------- 1 | version: 1.0.{build} 2 | branches: 3 | only: 4 | - master 5 | except: 6 | - gh-pages 7 | - coverity_scan 8 | 9 | skip_tags: true 10 | image: Visual Studio 2017 11 | 12 | init: 13 | - git config --global core.autocrlf input 14 | 15 | cache: 16 | - packages -> **\packages.config 17 | 18 | assembly_info: 19 | patch: true 20 | file: 'src\**\AssemblyInfo.cs' 21 | assembly_version: '{version}' 22 | assembly_file_version: '{version}' 23 | assembly_informational_version: '{version}' 24 | 25 | nuget: 26 | account_feed: true 27 | project_feed: true 28 | disable_publish_on_pr: true 29 | 30 | configuration: Release 31 | 32 | environment: 33 | COVERALLS_REPO_TOKEN: 34 | secure: B/NQfoRYUnKLGS5KJSJrGBvcYD0Jv+coudjJMY2jf+gqvqDWral9CDmv2i0WovY7 35 | COVERITY_TOKEN: 36 | secure: n9NA/kasTqxUc8UBfQ2cBlZcDyFJvko1gcMzVTDvZq8= 37 | COVERITY_EMAIL: 38 | secure: j/N0ZmnUZYKnS2nGocKyNsXoKQBfWTBOg+VI4q7yMn4= 39 | 40 | before_build: 41 | - dotnet restore ICSharpCode.SharpZipLib.sln 42 | 43 | build_script: 44 | - ps: Build\run-appveyor-build.ps1 45 | 46 | test_script: 47 | - dotnet test test\ICSharpCode.SharpZipLib.Tests 48 | 49 | after_test: 50 | - cmd: Build\run-opencover.cmd 51 | - cmd: packages\coveralls.io.1.3.4\tools\coveralls.net.exe --opencover Documentation\opencover-results-release.xml 52 | - cmd: nuget pack Build\ICSharpCode.SharpZipLib.nuspec -BasePath bin\Release\ -OutputDirectory bin\Release\ -Version %APPVEYOR_BUILD_VERSION% 53 | 54 | test_script: 55 | - cmd: nunit3-console --framework=net-4.5 --labels=All --testlist=ICSharpCode.SharpZipLib.Tests\PassingTests.txt --result=Documentation\nunit3-test-results-appveyor.xml;format=AppVeyor bin\Release\ICSharpCode.SharpZipLib.Tests.dll 56 | 57 | artifacts: 58 | - path: bin\Release 59 | name: BuildRelease 60 | - path: bin\**\*.nupkg 61 | name: NuGet 62 | - path: Documentation\*.xml 63 | name: TestResults 64 | - path: Documentation\coverity.zip 65 | name: Coverity 66 | 67 | deploy: 68 | - provider: GitHub 69 | release: sharpziplib-dogfood-{version} 70 | description: 'Something To Eat' 71 | auth_token: 72 | secure: pZ5zHJ/2mZsmqQH0gPke0LMqSgUhz79wbcCjdDTCEIl6hRJYlYhkaPianw2hz26k # your encrypted token from GitHub 73 | artifact: BuildRelease 74 | draft: true 75 | prerelease: true 76 | on: 77 | branch: master 78 | # appveyor_repo_tag: true # deploy on tag push only 79 | - provider: NuGet 80 | skip_symbols: false 81 | symbol_server: https://ci.appveyor.com/nuget/mcneight-93sw9hg8ve02/api/v2/package 82 | api_key: 83 | secure: z+iy8Iv5qqQghGrATRbx2I921HCHD7x7/xIrmkGGauMgpA/d1DBoOVUNNCHLE9Dj 84 | artifact: NuGet 85 | 86 | notifications: 87 | - provider: Email 88 | to: 89 | - mcneight+appveyor@gmail.com 90 | subject: Build {{status}} 91 | message: Version {{version}} {{commitId}} from {{branch}} {{status}} {{message}} 92 | on_build_success: true 93 | on_build_failure: true 94 | on_build_status_changed: true -------------------------------------------------------------------------------- /assets/ICSharpCode.SharpZipLib.snk: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/assets/ICSharpCode.SharpZipLib.snk -------------------------------------------------------------------------------- /assets/sharpziplib-nuget-256x256.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/assets/sharpziplib-nuget-256x256.png -------------------------------------------------------------------------------- /benchmark/.globalconfig: -------------------------------------------------------------------------------- 1 | is_global = true 2 | global_level = 2 3 | dotnet_diagnostic.CA2007.severity = none 4 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/BZip2/BZip2InputStream.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using BenchmarkDotNet.Attributes; 4 | 5 | namespace ICSharpCode.SharpZipLib.Benchmark.BZip2 6 | { 7 | [Config(typeof(MultipleRuntimes))] 8 | public class BZip2InputStream 9 | { 10 | private byte[] compressedData; 11 | 12 | public BZip2InputStream() 13 | { 14 | var outputMemoryStream = new MemoryStream(); 15 | using (var outputStream = new SharpZipLib.BZip2.BZip2OutputStream(outputMemoryStream)) 16 | { 17 | var random = new Random(1234); 18 | var inputData = new byte[1024 * 1024 * 30]; 19 | random.NextBytes(inputData); 20 | var inputMemoryStream = new MemoryStream(inputData); 21 | inputMemoryStream.CopyTo(outputStream); 22 | } 23 | 24 | compressedData = outputMemoryStream.ToArray(); 25 | } 26 | 27 | [Benchmark] 28 | public void DecompressData() 29 | { 30 | var memoryStream = new MemoryStream(compressedData); 31 | using (var inputStream = new SharpZipLib.BZip2.BZip2InputStream(memoryStream)) 32 | { 33 | inputStream.CopyTo(Stream.Null); 34 | } 35 | } 36 | } 37 | } 38 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Checksum/Adler32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BenchmarkDotNet.Attributes; 3 | 4 | namespace ICSharpCode.SharpZipLib.Benchmark.Checksum 5 | { 6 | [Config(typeof(MultipleRuntimes))] 7 | public class Adler32 8 | { 9 | private const int ChunkCount = 256; 10 | private const int ChunkSize = 1024 * 1024; 11 | private const int N = ChunkCount * ChunkSize; 12 | private readonly byte[] data; 13 | 14 | public Adler32() 15 | { 16 | data = new byte[N]; 17 | new Random(1).NextBytes(data); 18 | } 19 | 20 | [Benchmark] 21 | public long Adler32LargeUpdate() 22 | { 23 | var adler32 = new ICSharpCode.SharpZipLib.Checksum.Adler32(); 24 | adler32.Update(data); 25 | return adler32.Value; 26 | } 27 | 28 | /* 29 | [Benchmark] 30 | public long Adler32ChunkedUpdate() 31 | { 32 | var adler32 = new ICSharpCode.SharpZipLib.Checksum.Adler32(); 33 | 34 | for (int i = 0; i < ChunkCount; i++) 35 | { 36 | var segment = new ArraySegment(data, ChunkSize * i, ChunkSize); 37 | adler32.Update(segment); 38 | } 39 | 40 | return adler32.Value; 41 | } 42 | */ 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Checksum/BZip2Crc.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BenchmarkDotNet.Attributes; 3 | 4 | namespace ICSharpCode.SharpZipLib.Benchmark.Checksum 5 | { 6 | [Config(typeof(MultipleRuntimes))] 7 | public class BZip2Crc 8 | { 9 | private const int ChunkCount = 256; 10 | private const int ChunkSize = 1024 * 1024; 11 | private const int N = ChunkCount * ChunkSize; 12 | private readonly byte[] data; 13 | 14 | public BZip2Crc() 15 | { 16 | data = new byte[N]; 17 | new Random(1).NextBytes(data); 18 | } 19 | 20 | [Benchmark] 21 | public long BZip2CrcLargeUpdate() 22 | { 23 | var bzipCrc = new ICSharpCode.SharpZipLib.Checksum.BZip2Crc(); 24 | bzipCrc.Update(data); 25 | return bzipCrc.Value; 26 | } 27 | 28 | /* 29 | [Benchmark] 30 | public long BZip2CrcChunkedUpdate() 31 | { 32 | var bzipCrc = new ICSharpCode.SharpZipLib.Checksum.BZip2Crc(); 33 | 34 | for (int i = 0; i < ChunkCount; i++) 35 | { 36 | var segment = new ArraySegment(data, ChunkSize * i, ChunkSize); 37 | bzipCrc.Update(segment); 38 | } 39 | 40 | return bzipCrc.Value; 41 | } 42 | */ 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Checksum/Crc32.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using BenchmarkDotNet.Attributes; 3 | 4 | namespace ICSharpCode.SharpZipLib.Benchmark.Checksum 5 | { 6 | [Config(typeof(MultipleRuntimes))] 7 | public class Crc32 8 | { 9 | private const int ChunkCount = 256; 10 | private const int ChunkSize = 1024 * 1024; 11 | private const int N = ChunkCount * ChunkSize; 12 | private readonly byte[] data; 13 | 14 | public Crc32() 15 | { 16 | data = new byte[N]; 17 | new Random(1).NextBytes(data); 18 | } 19 | 20 | [Benchmark] 21 | public long Crc32LargeUpdate() 22 | { 23 | var crc32 = new ICSharpCode.SharpZipLib.Checksum.Crc32(); 24 | crc32.Update(data); 25 | return crc32.Value; 26 | } 27 | 28 | /* 29 | [Benchmark] 30 | public long Crc32ChunkedUpdate() 31 | { 32 | var crc32 = new ICSharpCode.SharpZipLib.Checksum.Crc32(); 33 | 34 | for (int i = 0; i < ChunkCount; i++) 35 | { 36 | var segment = new ArraySegment(data, ChunkSize * i, ChunkSize); 37 | crc32.Update(segment); 38 | } 39 | 40 | return crc32.Value; 41 | } 42 | */ 43 | } 44 | } 45 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/ICSharpCode.SharpZipLib.Benchmark.csproj: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | Exe 5 | net462;net6.0 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Program.cs: -------------------------------------------------------------------------------- 1 | using BenchmarkDotNet.Configs; 2 | using BenchmarkDotNet.Jobs; 3 | using BenchmarkDotNet.Running; 4 | using BenchmarkDotNet.Toolchains.CsProj; 5 | 6 | namespace ICSharpCode.SharpZipLib.Benchmark 7 | { 8 | public class MultipleRuntimes : ManualConfig 9 | { 10 | public MultipleRuntimes() 11 | { 12 | AddJob(Job.Default.WithToolchain(CsProjClassicNetToolchain.Net462).AsBaseline()); // NET 4.6.2 13 | AddJob(Job.Default.WithToolchain(CsProjCoreToolchain.NetCoreApp60)); // .NET 6.0 14 | } 15 | } 16 | 17 | class Program 18 | { 19 | static void Main(string[] args) 20 | { 21 | BenchmarkSwitcher.FromAssembly(typeof(Program).Assembly).Run(args); 22 | } 23 | } 24 | } 25 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Tar/TarInputStream.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Security.Cryptography; 4 | using System.Text; 5 | using System.Threading; 6 | using System.Threading.Tasks; 7 | using BenchmarkDotNet.Attributes; 8 | using ICSharpCode.SharpZipLib.Tar; 9 | 10 | namespace ICSharpCode.SharpZipLib.Benchmark.Tar 11 | { 12 | [MemoryDiagnoser] 13 | [Config(typeof(MultipleRuntimes))] 14 | public class TarInputStream 15 | { 16 | private readonly byte[] archivedData; 17 | private readonly byte[] readBuffer = new byte[1024]; 18 | 19 | public TarInputStream() 20 | { 21 | using (var outputMemoryStream = new MemoryStream()) 22 | { 23 | using (var zipOutputStream = 24 | new ICSharpCode.SharpZipLib.Tar.TarOutputStream(outputMemoryStream, Encoding.UTF8)) 25 | { 26 | var tarEntry = TarEntry.CreateTarEntry("some file"); 27 | tarEntry.Size = 1024 * 1024; 28 | zipOutputStream.PutNextEntry(tarEntry); 29 | 30 | var rng = RandomNumberGenerator.Create(); 31 | var inputBuffer = new byte[1024]; 32 | rng.GetBytes(inputBuffer); 33 | 34 | for (int i = 0; i < 1024; i++) 35 | { 36 | zipOutputStream.Write(inputBuffer, 0, inputBuffer.Length); 37 | } 38 | } 39 | 40 | archivedData = outputMemoryStream.ToArray(); 41 | } 42 | } 43 | 44 | [Benchmark] 45 | public long ReadTarInputStream() 46 | { 47 | using (var memoryStream = new MemoryStream(archivedData)) 48 | using (var zipInputStream = new ICSharpCode.SharpZipLib.Tar.TarInputStream(memoryStream, Encoding.UTF8)) 49 | { 50 | var entry = zipInputStream.GetNextEntry(); 51 | 52 | while (zipInputStream.Read(readBuffer, 0, readBuffer.Length) > 0) 53 | { 54 | } 55 | 56 | return entry.Size; 57 | } 58 | } 59 | 60 | [Benchmark] 61 | public async Task ReadTarInputStreamAsync() 62 | { 63 | using (var memoryStream = new MemoryStream(archivedData)) 64 | using (var zipInputStream = new ICSharpCode.SharpZipLib.Tar.TarInputStream(memoryStream, Encoding.UTF8)) 65 | { 66 | var entry = await zipInputStream.GetNextEntryAsync(CancellationToken.None); 67 | 68 | #if NETCOREAPP2_1_OR_GREATER 69 | while (await zipInputStream.ReadAsync(readBuffer.AsMemory()) > 0) 70 | { 71 | } 72 | #else 73 | while (await zipInputStream.ReadAsync(readBuffer, 0, readBuffer.Length) > 0) 74 | { 75 | } 76 | #endif 77 | 78 | return entry.Size; 79 | } 80 | } 81 | } 82 | } 83 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Tar/TarOutputStream.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Security.Cryptography; 3 | using System.Text; 4 | using System.Threading; 5 | using System.Threading.Tasks; 6 | using BenchmarkDotNet.Attributes; 7 | using ICSharpCode.SharpZipLib.Tar; 8 | 9 | namespace ICSharpCode.SharpZipLib.Benchmark.Tar 10 | { 11 | [MemoryDiagnoser] 12 | [Config(typeof(MultipleRuntimes))] 13 | public class TarOutputStream 14 | { 15 | private readonly byte[] backingArray = new byte[1024 * 1024 + (6 * 1024)]; 16 | private readonly byte[] inputBuffer = new byte[1024]; 17 | private static readonly RandomNumberGenerator _rng = RandomNumberGenerator.Create(); 18 | 19 | [Benchmark] 20 | public void WriteTarOutputStream() 21 | { 22 | using (var outputMemoryStream = new MemoryStream(backingArray)) 23 | { 24 | using (var tarOutputStream = 25 | new ICSharpCode.SharpZipLib.Tar.TarOutputStream(outputMemoryStream, Encoding.UTF8)) 26 | { 27 | var tarEntry = TarEntry.CreateTarEntry("some file"); 28 | tarEntry.Size = 1024 * 1024; 29 | tarOutputStream.PutNextEntry(tarEntry); 30 | 31 | _rng.GetBytes(inputBuffer); 32 | 33 | for (int i = 0; i < 1024; i++) 34 | { 35 | tarOutputStream.Write(inputBuffer, 0, inputBuffer.Length); 36 | } 37 | } 38 | } 39 | } 40 | 41 | [Benchmark] 42 | public async Task WriteTarOutputStreamAsync() 43 | { 44 | using (var outputMemoryStream = new MemoryStream(backingArray)) 45 | { 46 | using (var tarOutputStream = 47 | new ICSharpCode.SharpZipLib.Tar.TarOutputStream(outputMemoryStream, Encoding.UTF8)) 48 | { 49 | var tarEntry = TarEntry.CreateTarEntry("some file"); 50 | tarEntry.Size = 1024 * 1024; 51 | 52 | await tarOutputStream.PutNextEntryAsync(tarEntry, CancellationToken.None); 53 | 54 | _rng.GetBytes(inputBuffer); 55 | 56 | for (int i = 0; i < 1024; i++) 57 | { 58 | await tarOutputStream.WriteAsync(inputBuffer, 0, inputBuffer.Length); 59 | } 60 | } 61 | } 62 | } 63 | } 64 | } 65 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Zip/ZipFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Net.Http; 4 | using System.Threading.Tasks; 5 | using BenchmarkDotNet.Attributes; 6 | using ICSharpCode.SharpZipLib.Zip; 7 | 8 | namespace ICSharpCode.SharpZipLib.Benchmark.Zip 9 | { 10 | [MemoryDiagnoser] 11 | [Config(typeof(MultipleRuntimes))] 12 | public class ZipFile 13 | { 14 | private readonly byte[] readBuffer = new byte[4096]; 15 | private string zipFileWithLargeAmountOfEntriesPath; 16 | 17 | [GlobalSetup] 18 | public async Task GlobalSetup() 19 | { 20 | SharpZipLibOptions.InflaterPoolSize = 4; 21 | 22 | // large real-world test file from test262 repository 23 | string commitSha = "2e4e0e6b8ebe3348a207144204cb6d7a5571c863"; 24 | zipFileWithLargeAmountOfEntriesPath = Path.Combine(Path.GetTempPath(), $"{commitSha}.zip"); 25 | if (!File.Exists(zipFileWithLargeAmountOfEntriesPath)) 26 | { 27 | var uri = $"https://github.com/tc39/test262/archive/{commitSha}.zip"; 28 | 29 | Console.WriteLine("Loading test262 repository archive from {0}", uri); 30 | 31 | using (var client = new HttpClient()) 32 | { 33 | using (var downloadStream = await client.GetStreamAsync(uri)) 34 | { 35 | using (var writeStream = File.OpenWrite(zipFileWithLargeAmountOfEntriesPath)) 36 | { 37 | await downloadStream.CopyToAsync(writeStream); 38 | Console.WriteLine("File downloaded and saved to {0}", zipFileWithLargeAmountOfEntriesPath); 39 | } 40 | } 41 | } 42 | } 43 | 44 | } 45 | 46 | [Benchmark] 47 | public void ReadLargeZipFile() 48 | { 49 | using (var file = new SharpZipLib.Zip.ZipFile(zipFileWithLargeAmountOfEntriesPath)) 50 | { 51 | foreach (ZipEntry entry in file) 52 | { 53 | using (var stream = file.GetInputStream(entry)) 54 | { 55 | while (stream.Read(readBuffer, 0, readBuffer.Length) > 0) 56 | { 57 | } 58 | } 59 | } 60 | } 61 | } 62 | } 63 | } 64 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Zip/ZipInputStream.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using BenchmarkDotNet.Attributes; 3 | 4 | namespace ICSharpCode.SharpZipLib.Benchmark.Zip 5 | { 6 | [MemoryDiagnoser] 7 | [Config(typeof(MultipleRuntimes))] 8 | public class ZipInputStream 9 | { 10 | private const int ChunkCount = 64; 11 | private const int ChunkSize = 1024 * 1024; 12 | private const int N = ChunkCount * ChunkSize; 13 | 14 | byte[] zippedData; 15 | byte[] readBuffer = new byte[4096]; 16 | 17 | [GlobalSetup] 18 | public void GlobalSetup() 19 | { 20 | using (var memoryStream = new MemoryStream()) 21 | { 22 | using (var zipOutputStream = new SharpZipLib.Zip.ZipOutputStream(memoryStream)) 23 | { 24 | zipOutputStream.PutNextEntry(new SharpZipLib.Zip.ZipEntry("0")); 25 | 26 | var inputBuffer = new byte[ChunkSize]; 27 | 28 | for (int i = 0; i < ChunkCount; i++) 29 | { 30 | zipOutputStream.Write(inputBuffer, 0, inputBuffer.Length); 31 | } 32 | } 33 | 34 | zippedData = memoryStream.ToArray(); 35 | } 36 | } 37 | 38 | [Benchmark] 39 | public long ReadZipInputStream() 40 | { 41 | using (var memoryStream = new MemoryStream(zippedData)) 42 | { 43 | using (var zipInputStream = new SharpZipLib.Zip.ZipInputStream(memoryStream)) 44 | { 45 | var entry = zipInputStream.GetNextEntry(); 46 | 47 | while (zipInputStream.Read(readBuffer, 0, readBuffer.Length) > 0) 48 | { 49 | 50 | } 51 | 52 | return entry.Size; 53 | } 54 | } 55 | } 56 | } 57 | } 58 | -------------------------------------------------------------------------------- /benchmark/ICSharpCode.SharpZipLib.Benchmark/Zip/ZipOutputStream.cs: -------------------------------------------------------------------------------- 1 | using System.IO; 2 | using System.Threading.Tasks; 3 | using BenchmarkDotNet.Attributes; 4 | 5 | namespace ICSharpCode.SharpZipLib.Benchmark.Zip 6 | { 7 | [MemoryDiagnoser] 8 | [Config(typeof(MultipleRuntimes))] 9 | public class ZipOutputStream 10 | { 11 | private const int ChunkCount = 64; 12 | private const int ChunkSize = 1024 * 1024; 13 | private const int N = ChunkCount * ChunkSize; 14 | 15 | byte[] outputBuffer; 16 | byte[] inputBuffer; 17 | 18 | [GlobalSetup] 19 | public void GlobalSetup() 20 | { 21 | inputBuffer = new byte[ChunkSize]; 22 | outputBuffer = new byte[N]; 23 | } 24 | 25 | [Benchmark] 26 | public long WriteZipOutputStream() 27 | { 28 | using (var memoryStream = new MemoryStream(outputBuffer)) 29 | { 30 | var zipOutputStream = new SharpZipLib.Zip.ZipOutputStream(memoryStream); 31 | zipOutputStream.PutNextEntry(new SharpZipLib.Zip.ZipEntry("0")); 32 | 33 | for (int i = 0; i < ChunkCount; i++) 34 | { 35 | zipOutputStream.Write(inputBuffer, 0, inputBuffer.Length); 36 | } 37 | 38 | return memoryStream.Position; 39 | } 40 | } 41 | 42 | [Benchmark] 43 | public async Task WriteZipOutputStreamAsync() 44 | { 45 | using (var memoryStream = new MemoryStream(outputBuffer)) 46 | { 47 | using (var zipOutputStream = new SharpZipLib.Zip.ZipOutputStream(memoryStream)) 48 | { 49 | zipOutputStream.IsStreamOwner = false; 50 | zipOutputStream.PutNextEntry(new SharpZipLib.Zip.ZipEntry("0")); 51 | 52 | for (int i = 0; i < ChunkCount; i++) 53 | { 54 | await zipOutputStream.WriteAsync(inputBuffer, 0, inputBuffer.Length); 55 | } 56 | } 57 | 58 | return memoryStream.Position; 59 | } 60 | } 61 | } 62 | } 63 | -------------------------------------------------------------------------------- /docs/future/FILEFMTS.LST: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/future/FILEFMTS.LST -------------------------------------------------------------------------------- /docs/future/FILEFMTS_DWC.md: -------------------------------------------------------------------------------- 1 | DWC 2 | === 3 | 4 | The DWC archives seem to be a relict from ancient computing times - I've never 5 | seen any program that dealt with them or could create them. They are yet 6 | included in this compilation for reasons I don't know. But maybe one of you 7 | stumbles over such a file, he might find this documentation helpful. 8 | The DWC archives consist of single file entries with one archive trailer. The 9 | archive entries seem to be at the start of the archive, but maybe they are 10 | stored at the end of the archive, before the trailer. Each file header has the 11 | following format : 12 | 13 | ``` 14 | OFFSET Count TYPE Description 15 | 0000h 13 char Name of the original file in ASCIIZ. 16 | 000Dh 1 dword Size of the original file 17 | 0011h 1 dword MS-DOS date and time of the original file 18 | 0015h 1 dword Size of the compressed file 19 | 0019h 1 dword Offset of compressed data in archive file 20 | 001Dh 3 byte reserved 21 | 0020h 1 byte Method : 22 | 1 - crunched 23 | 2 - stored 24 | 25 | The trailer at the end of each archive has the following format : 26 | OFFSET Count TYPE Description 27 | 0000h 1 word Length of trailer (=27) 28 | 0002h 1 word Size of the directory entries (=34)?? 29 | 0004h 16 byte reserved 30 | 0014h 1 dword Count of the directory entries 31 | 0018h 3 char ID="DWC" 32 | 33 | EXTENSION:DWC?? 34 | OCCURENCES:PC?? 35 | PROGRAMS:DWC.EXE?? 36 | ``` 37 | -------------------------------------------------------------------------------- /docs/future/FILEFMTS_GZIP.md: -------------------------------------------------------------------------------- 1 | --------A-GZIP------------------------------ 2 | The GNU ZIP program is an archive program mostly for the UNIX machines developed 3 | by the GNU project. 4 | OFFSET Count TYPE Description 5 | 0000h 2 char ID='!',139 6 | 0002h 1 byte Method : 7 | 0-7 - reserved 8 | 8 - deflated 9 | 0003h 1 byte File flags : 10 | 0 - ASCII-text 11 | 1 - Multi-part file 12 | 2 - Name present 13 | 3 - Comment present 14 | 4 - Encrypted 15 | 5-8 - reserved 16 | 0004h 1 dword File date and time (see table 0009) 17 | 0008h 1 byte Extra flags 18 | 0009h 1 byte Target OS : 19 | 0 - DOS 20 | 1 - Amiga 21 | 2 - VMS 22 | 3 - Unix 23 | 4 - ???? 24 | 5 - Atari 25 | 6 - OS/2 26 | 7 - MacOS 27 | 10 - TOPS-20 28 | 11 - Win/32 29 | EXTENSION:ZIP 30 | PROGRAMS:GNU gzip 31 | -------------------------------------------------------------------------------- /docs/future/FILEFMTS_HA.md: -------------------------------------------------------------------------------- 1 | --------A-HA-------------------------------- 2 | HA files (not to be confused with HamarSoft's HAP files [3]) contain a 3 | small archive header with a word count of the number of files in the 4 | archive. The constituent files stored sequentially with a header followed 5 | by the compressed data, as is with most archives. 6 | 7 | The main file header is formatted as follows: 8 | OFFSET Count TYPE Description 9 | 0000h 2 char ID='HA' 10 | 0002h 1 word Number of files in archive 11 | 12 | Every compressed file has a header before it, like this : 13 | 14 | OFFSET Count TYPE Description 15 | 0000h 1 byte Version & compression type 16 | 0001h 1 dword Compressed file size 17 | 0005h 1 dword Original file size 18 | 0009h 1 dword CCITT CRC-32 (same as ZModem/PkZIP) 19 | 000Dh 1 dword File time-stamp (Unix format) 20 | ? ? char ASCIIZ pathname 21 | ? ? char ASCIIZ filename 22 | ????h 1 byte Length of machine specific information 23 | ? byte Machine specific information 24 | 25 | Note that the path separator for pathnames is the 0FFh (255) character. 26 | 27 | The high nybble of the version & compression type field contains the 28 | version information (0=HA 0.98), the low nybble is the compression type : 29 | 30 | (Table 0012) 31 | HA compression types 32 | 0 "CPY" File is stored (no compression) 33 | 1 "ASC" Default compression method, using a sliding 34 | window dictionary with an arithmetic coder. 35 | 2 "HSC" Compression using a "finite context [sic] 36 | model and arithmetic coder" 37 | 14 "DIR" Directory entry 38 | 15 "SPECIAL" Used with HA 0.99B (?) 39 | 40 | 41 | Machine specific information known: 42 | 43 | 1 byte Machine type (Host-OS) 44 | 45 | 1 = MS DOS 46 | 2 = Linux (Unix) 47 | 48 | ? bytes Information (currently only file-attribute info) 49 | 50 | EXTENSION:HA 51 | OCCURENCES:PC, Linux 52 | PROGRAMS:HA 53 | REFERENCE: 54 | -------------------------------------------------------------------------------- /docs/future/FILEFMTS_HYP.md: -------------------------------------------------------------------------------- 1 | --------A-HYP------------------------------- 2 | The Hyper archiver is a very fast compression program by P. Sawatzki and K.P. 3 | Nischke, which uses LZW compression techniques for compression. It is not very 4 | widespread - in fact, I've yet to see a package distributed in this format. 5 | 6 | OFFSET Count TYPE Description 7 | 0000h 1 byte ID=1Ah 8 | 0001h 2 char Compression method 9 | "HP" - compressed 10 | "ST" - stored 11 | 0003h 1 byte Version file was compressed by in BCD 12 | 0004h 1 dword Compressed file size 13 | 0008h 1 dword Original file size 14 | 000Ch 1 dword MS-DOS date and time of file (see table 0009) 15 | 0010h 1 dword CRC-32 of file 16 | 0014h 1 byte MS-DOS file attribute 17 | 0015h 1 byte Length of filename 18 | ="LEN" 19 | 0016h "LEN" char Filename 20 | 21 | EXTENSION:HYP 22 | OCCURENCES:PC 23 | PROGRAMS:HYPER.EXE 24 | -------------------------------------------------------------------------------- /docs/future/FILEFMTS_LBR.md: -------------------------------------------------------------------------------- 1 | LBR 2 | === 3 | 4 | The LBR files consist of a direcotry and one or more "members". The directory 5 | contains from 4 to 256 entries and each entry describes one member. 6 | The first directory entry describes the directory itself. All space allocations 7 | are in terms of sectors, where a sector is 128 bytes long. Four directory 8 | entries fit in one sector thus the number of directory entries is always evenly 9 | divisible by 4. Different types of LBR files exist, all versions are discussed 10 | here, the directory entry looks like this : 11 | 12 | ``` 13 | OFFSET Count TYPE Description 14 | 0000h 1 byte File status : 15 | 0 - active 16 | 254 - deleted 17 | 255 - free 18 | 0001h 11 char File name in FCB format (8/3, blank padded), 19 | directory name is blanks for old LU, 20 | ID='********DIR' 21 | for LUPC 22 | 000Ch 1 word Offset to file data in sectors 23 | 000Eh 1 word Length of stored data in sectors 24 | 25 | For the LUPC program, the remaining 16 bytes are used like this : 26 | OFFSET Count TYPE Description 27 | 0000h 8 char ASCII date of creation (MM/DD/YY) 28 | 0008h 8 char ASCII time of creation (HH:MM:SS) 29 | 30 | For the LU86 program, the remaining 16 bytes are used like this : 31 | OFFSET Count TYPE Description 32 | 0000h 1 word CRC-16 or 0 33 | 0002h 1 word Creation date in CP/M format 34 | 0004h 1 word Creation time in DOS format 35 | 0006h 1 word Date of last modification, CP/M format 36 | 0008h 1 word Time of last modification, DOS format 37 | 000Ah 1 byte Number of bytes in last sector 38 | 000Bh 5 byte reserved (0) 39 | 40 | EXTENSION:LBR 41 | OCCURENCES:PC,CP/M 42 | PROGRAMS:LU.COM, LUU.COM, LU86.COM 43 | SEE ALSO: 44 | ``` 45 | -------------------------------------------------------------------------------- /docs/future/FILEFMTS_LZH.md: -------------------------------------------------------------------------------- 1 | LZH 2 | === 3 | 4 | The LHArc/LHA archiver is a multi platform archiver made by Haruyasu Yoshizaki, 5 | which has a relatively good compression. It uses more or less the same 6 | technology like the ZIP programs by Phil Katz. There was a hack named "ICE", 7 | which had only the graphic characters displayed on decompression changed. 8 | 9 | ``` 10 | OFFSET Count TYPE Description 11 | 0000h 1 byte Size of archived file header 12 | 0001h 1 byte Checksum of remaining bytes 13 | 0002h 3 char ID='-lh' 14 | ID='-lz' 15 | 0005h 1 char Compression methods used (see table 0005) 16 | 0006h 1 char ID='-' 17 | 0007h 1 dword Compressed size 18 | 000Bh 1 dword Uncompressed size 19 | 000Fh 1 dword Original file date/time (see table 0009) 20 | 0013h 1 word File attribute 21 | 0015h 1 byte Filename / path length in bytes 22 | ="LEN" 23 | 0016h "LEN" char Filename / path 24 | 0018h 1 word CRC-16 of original file 25 | +"LEN" 26 | 27 | (Table 0005) 28 | LHArc compression types 29 | "0" - No compression 30 | "1" - LZW, 4K buffer, Huffman for upper 6 bits of position 31 | "2" - unknown 32 | "3" - unknown 33 | "4" - LZW, Arithmetic Encoding 34 | "5" - LZW, Arithmetic Encoding 35 | "s" - LHa 2.x archive? 36 | "\" - LHa 2.x archive? 37 | "d" - LHa 2.x archive? 38 | 39 | EXTENSION:LZH,ICE 40 | OCCURENCES:PC 41 | PROGRAMS:LHArc.EXE, LHA.EXE 42 | ``` 43 | -------------------------------------------------------------------------------- /docs/future/FILEFMTS_ZOO.md: -------------------------------------------------------------------------------- 1 | --------A-ZOO------------------------------- 2 | The ZOO archive program by Raoul Dhesi is a file compression program now 3 | superceeded in both compression and speed by most other compression programs. 4 | The archive header looks like this : 5 | OFFSET Count TYPE Description 6 | 0000h 20 char Archive header text, ^Z terminated, null padded 7 | 0014h 1 dword ID=0FDC4A7DCh 8 | 0018h 1 dword Offset of first file in archive 9 | 001Ch 1 dword Offset of ???? 10 | 0020h 1 byte Version archive was made by 11 | 0021h 1 byte Minimum version needed to extract 12 | 13 | Each stored file has its own header, which looks like this : 14 | OFFSET Count TYPE Description 15 | 0000h 1 dword ID=0FDC4A7DCh 16 | 0004h 1 byte Type of directory entry 17 | 0005h 1 byte Compression method : 18 | 0 - stored 19 | 1 - Crunched : LZW, 4K buffer, 20 | var len (9-13 bits) 21 | 0006h 1 dword Offset of next directory entry 22 | 000Ah 1 dword Offset of next header 23 | 000Dh 1 word Original date / time of file (see table 0009) 24 | 0012h 1 word CRC-16 of file 25 | 0014h 1 dword Uncompressed size of file 26 | 0018h 1 dword Compressed size of file 27 | 001Ch 1 byte Version this file was compressed by 28 | 001Dh 1 byte Minimum version needed to extract 29 | 001Eh 1 byte Deleted flag 30 | 0 - file in archive 31 | 1 - file is considered deleted 32 | 001Fh 1 dword Offset of comment field, 0 if none 33 | 0023h 1 word Length of comment field 34 | 0025h ? char ASCIIZ path / filename 35 | 36 | EXTENSION:ZOO 37 | OCCURENCES:PC 38 | PROGRAMS:ZOO.EXE 39 | REFERENCE: 40 | VALIDATION: 41 | -------------------------------------------------------------------------------- /docs/future/FILE_ID.DIZ: -------------------------------------------------------------------------------- 1 | File formats Release #03 12/02 2 | 3 | A documentation of over 100 file 4 | formats covering : 5 | 6 | Modules : (MOD,S3M,669,XM,etc.) 7 | Images : (GIF,LBM,IFF,PCX,etc.) 8 | Binaries: (COM,EXE,Windows,etc.) 9 | Archives: (ARJ,LHA,ZIP,etc.) 10 | Sound : (VOC,WAV,ZYX,.AU,etc.) 11 | DataBase: (DBF) -------------------------------------------------------------------------------- /docs/help/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # folder # 3 | ############### 4 | /**/DROP/ 5 | /**/TEMP/ 6 | /**/packages/ 7 | /**/bin/ 8 | /**/obj/ 9 | _site 10 | -------------------------------------------------------------------------------- /docs/help/BuildingHelpInfo.txt: -------------------------------------------------------------------------------- 1 | # Basics 2 | 3 | You need DocFx: 4 | 5 | https://dotnet.github.io/docfx/tutorial/docfx_getting_started.html#2-use-docfx-as-a-command-line-tool 6 | 7 | You have to run it using the "Developer Command Prompt for VS 2017" 8 | 9 | 10 | # Building 11 | 12 | In this folder, run "docfx metadata" to build the API documentation (/api folder) 13 | 14 | In this folder, run "serve.bat" to build & serve the documenation for local testing 15 | 16 | 17 | # Publishing 18 | 19 | The _site folder is to be copied to gh-pages branch for publishing -------------------------------------------------------------------------------- /docs/help/api/.gitignore: -------------------------------------------------------------------------------- 1 | ############### 2 | # temp file # 3 | ############### 4 | *.yml 5 | -------------------------------------------------------------------------------- /docs/help/api/index.md: -------------------------------------------------------------------------------- 1 | # API Documentation 2 | 3 | Please select class / method / property from the tree on the left side to learn more. 4 | -------------------------------------------------------------------------------- /docs/help/articles/intro.md: -------------------------------------------------------------------------------- 1 | # Articles 2 | 3 | FAQ and walk-through-sample explanations are provided in the [Wiki](https://github.com/icsharpcode/SharpZipLib/wiki) 4 | -------------------------------------------------------------------------------- /docs/help/articles/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Introduction 2 | href: intro.md 3 | -------------------------------------------------------------------------------- /docs/help/docfx.json: -------------------------------------------------------------------------------- 1 | { 2 | "metadata": [ 3 | { 4 | "src": [ 5 | { 6 | "cwd": "../../src/", 7 | "files": [ 8 | "ICSharpCode.SharpZipLib/**.csproj" 9 | ], 10 | "exclude": [ 11 | "**/obj/**", 12 | "**/bin/**", 13 | "_site/**" 14 | ] 15 | } 16 | ], 17 | "dest": "api", 18 | "properties": { 19 | "TargetFramework": "netstandard2.0" 20 | } 21 | } 22 | ], 23 | "build": { 24 | "content": [ 25 | { 26 | "files": [ 27 | "api/**.yml", 28 | "api/index.md" 29 | ] 30 | }, 31 | { 32 | "files": [ 33 | "articles/**.md", 34 | "articles/**/toc.yml", 35 | "toc.yml", 36 | "*.md" 37 | ], 38 | "exclude": [ 39 | "obj/**", 40 | "_site/**" 41 | ] 42 | } 43 | ], 44 | "resource": [ 45 | { 46 | "files": [ 47 | "images/**" 48 | ], 49 | "exclude": [ 50 | "obj/**", 51 | "_site/**" 52 | ] 53 | } 54 | ], 55 | "overwrite": [ 56 | { 57 | "files": [ 58 | "apidoc/**.md" 59 | ], 60 | "exclude": [ 61 | "obj/**", 62 | "_site/**" 63 | ] 64 | } 65 | ], 66 | "globalMetadata": { 67 | "_appTitle": "SharpZipLib Help", 68 | "_appFooter": "Copyright © 2000-2022 SharpZipLib Contributors", 69 | "_gitContribute": { 70 | "repo": "https://github.com/icsharpcode/SharpZipLib", 71 | "branch": "master" 72 | } 73 | }, 74 | "dest": "_site", 75 | "globalMetadataFiles": [], 76 | "fileMetadataFiles": [], 77 | "template": [ 78 | "default", 79 | "template" 80 | ], 81 | "postProcessors": [], 82 | "noLangKeyword": false, 83 | "keepFileLink": false, 84 | "cleanupCacheHistory": false 85 | } 86 | } 87 | -------------------------------------------------------------------------------- /docs/help/index.md: -------------------------------------------------------------------------------- 1 | # Help Homepage. 2 | 3 | Looking for the [API Documentation](api/index.md)? 4 | 5 | Looking for the [source code](https://github.com/icsharpcode/SharpZipLib)? 6 | 7 | Want to report a bug, suggest a new feature, ask a deep technical question? [Issues](https://github.com/icsharpcode/SharpZipLib/issues) 8 | 9 | -------------------------------------------------------------------------------- /docs/help/serve.bat: -------------------------------------------------------------------------------- 1 | docfx docfx.json --serve -------------------------------------------------------------------------------- /docs/help/template/partials/navbar.tmpl.partial: -------------------------------------------------------------------------------- 1 | -------------------------------------------------------------------------------- /docs/help/template/styles/main.css: -------------------------------------------------------------------------------- 1 | button, a { 2 | color: #516d86; 3 | cursor: pointer; 4 | } 5 | 6 | .affix > ul > li.active > a, .affix > ul > li.active > a:before, 7 | .affix ul > li.active > a, .affix ul > li.active > a:before { 8 | color: #516d86; 9 | } 10 | 11 | .toc .nav > li.active > a { 12 | color: #7391ab; 13 | } 14 | 15 | .navbar-default .navbar-nav>.active>a, .navbar-default .navbar-nav>.active>a:focus, .navbar-default .navbar-nav>.active>a:hover { 16 | color: #181c20; 17 | background-color: #c4cdd4; 18 | } 19 | 20 | svg:hover path { 21 | fill: currentColor; 22 | } 23 | 24 | .navbar-default .navbar-brand:focus, .navbar-default .navbar-brand:hover { 25 | color: #3d4852; 26 | } 27 | 28 | #toc .level1 > li { 29 | font-weight: normal; 30 | font-size: 14px; 31 | } 32 | 33 | #sidetoc .sidetoc.shiftup { 34 | bottom: 50px; 35 | } 36 | -------------------------------------------------------------------------------- /docs/help/toc.yml: -------------------------------------------------------------------------------- 1 | - name: Articles 2 | href: articles/ 3 | - name: Api Documentation 4 | href: api/ 5 | homepage: api/index.md 6 | -------------------------------------------------------------------------------- /docs/opencover/ICSharpCode.SharpZipLib_CompletedFileHandler.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ICSharpCode.SharpZipLib.Core.CompletedFileHandler - Coverage Report 6 | 7 |
8 |

Summary

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Class:ICSharpCode.SharpZipLib.Core.CompletedFileHandler
Assembly:ICSharpCode.SharpZipLib
File(s):
Covered lines:0
Uncovered lines:0
Coverable lines:0
Total lines:0
Line coverage:
25 |

File(s)

26 |

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

27 |
28 | 29 | -------------------------------------------------------------------------------- /docs/opencover/ICSharpCode.SharpZipLib_DirectoryFailureHandler.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ICSharpCode.SharpZipLib.Core.DirectoryFailureHandler - Coverage Report 6 | 7 |
8 |

Summary

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Class:ICSharpCode.SharpZipLib.Core.DirectoryFailureHandler
Assembly:ICSharpCode.SharpZipLib
File(s):
Covered lines:0
Uncovered lines:0
Coverable lines:0
Total lines:0
Line coverage:
25 |

File(s)

26 |

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

27 |
28 | 29 | -------------------------------------------------------------------------------- /docs/opencover/ICSharpCode.SharpZipLib_FileFailureHandler.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ICSharpCode.SharpZipLib.Core.FileFailureHandler - Coverage Report 6 | 7 |
8 |

Summary

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Class:ICSharpCode.SharpZipLib.Core.FileFailureHandler
Assembly:ICSharpCode.SharpZipLib
File(s):
Covered lines:0
Uncovered lines:0
Coverable lines:0
Total lines:0
Line coverage:
25 |

File(s)

26 |

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

27 |
28 | 29 | -------------------------------------------------------------------------------- /docs/opencover/ICSharpCode.SharpZipLib_ProcessFileHandler.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ICSharpCode.SharpZipLib.Core.ProcessFileHandler - Coverage Report 6 | 7 |
8 |

Summary

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Class:ICSharpCode.SharpZipLib.Core.ProcessFileHandler
Assembly:ICSharpCode.SharpZipLib
File(s):
Covered lines:0
Uncovered lines:0
Coverable lines:0
Total lines:0
Line coverage:
25 |

File(s)

26 |

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

27 |
28 | 29 | -------------------------------------------------------------------------------- /docs/opencover/ICSharpCode.SharpZipLib_ProgressHandler.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ICSharpCode.SharpZipLib.Core.ProgressHandler - Coverage Report 6 | 7 |
8 |

Summary

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Class:ICSharpCode.SharpZipLib.Core.ProgressHandler
Assembly:ICSharpCode.SharpZipLib
File(s):
Covered lines:0
Uncovered lines:0
Coverable lines:0
Total lines:0
Line coverage:
25 |

File(s)

26 |

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

27 |
28 | 29 | -------------------------------------------------------------------------------- /docs/opencover/ICSharpCode.SharpZipLib_ProgressMessageHandler.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ICSharpCode.SharpZipLib.Tar.ProgressMessageHandler - Coverage Report 6 | 7 |
8 |

Summary

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Class:ICSharpCode.SharpZipLib.Tar.ProgressMessageHandler
Assembly:ICSharpCode.SharpZipLib
File(s):
Covered lines:0
Uncovered lines:0
Coverable lines:0
Total lines:0
Line coverage:
25 |

File(s)

26 |

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

27 |
28 | 29 | -------------------------------------------------------------------------------- /docs/opencover/ICSharpCode.SharpZipLib_ZipTestResultHandler.htm: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | ICSharpCode.SharpZipLib.Zip.ZipTestResultHandler - Coverage Report 6 | 7 |
8 |

Summary

9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 |
Class:ICSharpCode.SharpZipLib.Zip.ZipTestResultHandler
Assembly:ICSharpCode.SharpZipLib
File(s):
Covered lines:0
Uncovered lines:0
Coverable lines:0
Total lines:0
Line coverage:
25 |

File(s)

26 |

No files found. This usually happens if a file isn't covered by a test or the class does not contain any sequence points (e.g. a class that only contains auto properties).

27 |
28 | 29 | -------------------------------------------------------------------------------- /docs/opencover/pic_branch0.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch0.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch10.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch10.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch100.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch100.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch20.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch20.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch30.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch30.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch40.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch40.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch50.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch50.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch60.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch60.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch70.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch70.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch80.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch80.png -------------------------------------------------------------------------------- /docs/opencover/pic_branch90.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_branch90.png -------------------------------------------------------------------------------- /docs/opencover/pic_collapsed.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_collapsed.png -------------------------------------------------------------------------------- /docs/opencover/pic_expanded.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_expanded.png -------------------------------------------------------------------------------- /docs/opencover/pic_pin_pinned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_pin_pinned.png -------------------------------------------------------------------------------- /docs/opencover/pic_pin_unpinned.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_pin_unpinned.png -------------------------------------------------------------------------------- /docs/opencover/pic_sortactive_asc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_sortactive_asc.png -------------------------------------------------------------------------------- /docs/opencover/pic_sortactive_desc.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_sortactive_desc.png -------------------------------------------------------------------------------- /docs/opencover/pic_sortinactive.png: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/opencover/pic_sortinactive.png -------------------------------------------------------------------------------- /docs/specification/README.md: -------------------------------------------------------------------------------- 1 | SharpZipLib Specifications 2 | ========================== 3 | 4 | | Spec | Title |Version| 5 | |:------:|:----------------------------------------------------|-------| 6 | |[bzip2 Manual](bzip2-manual-1.0.5.html)|Manual for bzip2 and libbzip2|1.0.5| 7 | |[RFC 1950](rfc1950.txt)|ZLIB Compressed Data Format Specification|3.3| 8 | |[RFC 1951](rfc1951.txt)|DEFLATE Compressed Data Format Specification|1.3| 9 | |[RFC 1952](rfc1952.txt)|GZIP file format specification|4.3| 10 | |[gzip format](format.txt)|Provides additional information not in the RFCs|| 11 | |[gzip algorithm](algorithm.txt)|Brief description of the algorithms used by gzip|| 12 | |[tar chapter 8](tar_8.html)|GNU tar manual, "Controlling the Archive Format"|1.28| 13 | |[tar appendix d](tar_14.html)|GNU tar manual, "Tar Internals"|1.28| 14 | |[zip appnote](appnote.txt)|ZIP File Format Specification|6.3.4| 15 | -------------------------------------------------------------------------------- /docs/specification/bzip2-manual-1.0.5.html: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/docs/specification/bzip2-manual-1.0.5.html -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_BZip2/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | // General Information about an assembly is controlled through the following 4 | // set of attributes. Change these attribute values to modify the information 5 | // associated with an assembly. 6 | [assembly: AssemblyTitle("Cmd_BZip2")] 7 | [assembly: AssemblyDescription("bzip2 based file compression")] 8 | [assembly: AssemblyCulture("")] 9 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_BZip2/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_BZip2/readme.txt: -------------------------------------------------------------------------------- 1 | minibzip2 2 | --------- 3 | 4 | Usage: 5 | 6 | 7 | minibzip2 [filename] 8 | 9 | Will create (or overwrite) a file [filename].bz2 with the bzipped 10 | contents of [filename] 11 | 12 | minibzip2 -d [filename].bz2 13 | 14 | Will create (or overwrite) a file [filename] with the bunzipped 15 | contents of [filename] -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_Checksum/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | [assembly: AssemblyTitle("Cmd_Checksum")] 4 | [assembly: AssemblyDescription("file checksum generator")] 5 | [assembly: AssemblyCulture("")] 6 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_Checksum/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_Checksum/readme.txt: -------------------------------------------------------------------------------- 1 | minigzip 2 | -------- 3 | 4 | Usage: 5 | 6 | 7 | minigzip [filename] 8 | 9 | Will create (or overwrite) a file [filename].gz with the gzipped 10 | contents of [filename] 11 | 12 | minigzip -d [filename].gz 13 | 14 | Will create (or overwrite) a file [filename] with the gunzipped 15 | contents of [filename] 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_GZip/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | [assembly: AssemblyTitle("Cmd_GZip")] 4 | [assembly: AssemblyDescription("gzip based file compression")] 5 | [assembly: AssemblyCulture("")] 6 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_GZip/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_GZip/readme.txt: -------------------------------------------------------------------------------- 1 | minigzip 2 | -------- 3 | 4 | Usage: 5 | 6 | 7 | minigzip [filename] 8 | 9 | Will create (or overwrite) a file [filename].gz with the gzipped 10 | contents of [filename] 11 | 12 | minigzip -d [filename].gz 13 | 14 | Will create (or overwrite) a file [filename] with the gunzipped 15 | contents of [filename] 16 | 17 | 18 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_Tar/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | // Information about this assembly is defined by the following 4 | // attributes. 5 | // 6 | // change them to the information which is associated with the assembly 7 | // you compile. 8 | 9 | [assembly: AssemblyTitle("Tar Sharp Sample")] 10 | [assembly: AssemblyDescription("A simple tar application")] 11 | [assembly: AssemblyCulture("")] 12 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_Tar/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_ZipInfo/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | [assembly: AssemblyTitle("Cmd_ZipInfo")] 4 | [assembly: AssemblyDescription("list detailed information about a ZIP archive")] 5 | [assembly: AssemblyCulture("")] 6 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_ZipInfo/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/Cmd_ZipInfo/readme.txt: -------------------------------------------------------------------------------- 1 | ziplist 2 | ------- 3 | 4 | Usage: 5 | 6 | 7 | ziplist [filename] 8 | 9 | will view the headers of the zipfile [filename] -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/CreateZipFile/CreateZipFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using ICSharpCode.SharpZipLib.Zip; 4 | 5 | class CreateZipFile 6 | { 7 | public static void Main(string[] args) 8 | { 9 | // Perform some simple parameter checking. More could be done 10 | // like checking the target file name is ok, disk space, and lots 11 | // of other things, but for a demo this covers some obvious traps. 12 | if (args.Length < 2) { 13 | Console.WriteLine("Usage: CreateZipFile Path ZipFile"); 14 | return; 15 | } 16 | 17 | if (!Directory.Exists(args[0])) { 18 | Console.WriteLine("Cannot find directory '{0}'", args[0]); 19 | return; 20 | } 21 | 22 | try { 23 | // Depending on the directory this could be very large and would require more attention 24 | // in a commercial package. 25 | string[] filenames = Directory.GetFiles(args[0]); 26 | 27 | // 'using' statements guarantee the stream is closed properly which is a big source 28 | // of problems otherwise. Its exception safe as well which is great. 29 | using (ZipOutputStream s = new ZipOutputStream(File.Create(args[1]))) 30 | { 31 | 32 | s.SetLevel(9); // 0 - store only to 9 - means best compression 33 | 34 | byte[] buffer = new byte[4096]; 35 | 36 | foreach (string file in filenames) 37 | { 38 | 39 | // Using GetFileName makes the result compatible with XP 40 | // as the resulting path is not absolute. 41 | var entry = new ZipEntry(Path.GetFileName(file)); 42 | 43 | // Setup the entry data as required. 44 | 45 | // Crc and size are handled by the library for seakable streams 46 | // so no need to do them here. 47 | 48 | // Could also use the last write time or similar for the file. 49 | entry.DateTime = DateTime.Now; 50 | s.PutNextEntry(entry); 51 | 52 | using (FileStream fs = File.OpenRead(file)) { 53 | 54 | // Using a fixed size buffer here makes no noticeable difference for output 55 | // but keeps a lid on memory usage. 56 | int sourceBytes; 57 | do 58 | { 59 | sourceBytes = fs.Read(buffer, 0, buffer.Length); 60 | s.Write(buffer, 0, sourceBytes); 61 | } while (sourceBytes > 0); 62 | } 63 | } 64 | 65 | // Finish/Close arent needed strictly as the using statement does this automatically 66 | 67 | // Finish is important to ensure trailing information for a Zip file is appended. Without this 68 | // the created file would be invalid. 69 | s.Finish(); 70 | 71 | // Close is important to wrap things up and unlock the file. 72 | s.Close(); 73 | } 74 | } catch (Exception ex) { 75 | Console.WriteLine("Exception during processing {0}", ex); 76 | 77 | // No need to rethrow the exception as for our purposes its handled. 78 | } 79 | } 80 | } 81 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/CreateZipFile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | // General Information about an assembly is controlled through the following 4 | // set of attributes. Change these attribute values to modify the information 5 | // associated with an assembly. 6 | [assembly: AssemblyTitle("CreateZipFile")] 7 | [assembly: AssemblyDescription("A SharpZipLib sample program")] 8 | [assembly: AssemblyCulture("")] 9 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/CreateZipFile/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/CreateZipFile/readme.txt: -------------------------------------------------------------------------------- 1 | createzipfile 2 | ------------- 3 | 4 | Usage: 5 | 6 | createzipfile [directoryname] [zipfilename] 7 | 8 | will create zipfilename and store all files in the directory [directoryname] 9 | in it. 10 | 11 | (btw. [directoryname] is a directoryname like C:\testdir not *.* or other 12 | wildcards) 13 | 14 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/FastZip/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | // General Information about an assembly is controlled through the following 4 | // set of attributes. Change these attribute values to modify the information 5 | // associated with an assembly. 6 | [assembly: AssemblyTitle("FastZip sample")] 7 | [assembly: AssemblyDescription("A SharpZipLib sample program")] 8 | [assembly: AssemblyCulture("")] 9 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/FastZip/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/SampleAssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | using System.Runtime.CompilerServices; 3 | 4 | // 5 | // General Information about an assembly is controlled through the following 6 | // set of attributes. Change these attribute values to modify the information 7 | // associated with an assembly. 8 | // 9 | [assembly: AssemblyTitle("ZF")] 10 | [assembly: AssemblyDescription("ZF A SharpZipLib Sample")] 11 | [assembly: AssemblyConfiguration("")] 12 | [assembly: AssemblyCompany("")] 13 | [assembly: AssemblyProduct("")] 14 | [assembly: AssemblyCopyright("Copyright © 2000-2016 AlphaSierraPapa for the SharpZipLib Team")] 15 | [assembly: AssemblyTrademark("")] 16 | [assembly: AssemblyCulture("")] 17 | 18 | // 19 | // Version information for an assembly consists of the following four values: 20 | // 21 | // Major Version 22 | // Minor Version 23 | // Build Number 24 | // Revision 25 | // 26 | // You can specify all the values or you can default the Revision and Build Numbers 27 | // by using the '*' as shown below: 28 | 29 | [assembly: AssemblyVersion("0.85.4.369")] 30 | 31 | // 32 | // In order to sign your assembly you must specify a key to use. Refer to the 33 | // Microsoft .NET Framework documentation for more information on assembly signing. 34 | // 35 | // Use the attributes below to control which key is used for signing. 36 | // 37 | // Notes: 38 | // (*) If no key is specified, the assembly is not signed. 39 | // (*) KeyName refers to a key that has been installed in the Crypto Service 40 | // Provider (CSP) on your machine. KeyFile refers to a file which contains 41 | // a key. 42 | // (*) If the KeyFile and the KeyName values are both specified, the 43 | // following processing occurs: 44 | // (1) If the KeyName can be found in the CSP, that key is used. 45 | // (2) If the KeyName does not exist and the KeyFile does exist, the key 46 | // in the KeyFile is installed into the CSP and used. 47 | // (*) In order to create a KeyFile, you can use the sn.exe (Strong Name) utility. 48 | // When specifying the KeyFile, the location of the KeyFile should be 49 | // relative to the project output directory which is 50 | // %Project Directory%\obj\. For example, if your KeyFile is 51 | // located in the project directory, you would specify the AssemblyKeyFile 52 | // attribute as [assembly: AssemblyKeyFile("..\\..\\mykey.snk")] 53 | // (*) Delay Signing is an advanced option - see the Microsoft .NET Framework 54 | // documentation for more information on this. 55 | // 56 | [assembly: AssemblyDelaySign(false)] 57 | [assembly: AssemblyKeyFile("")] 58 | [assembly: AssemblyKeyName("")] 59 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/sz/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | // General Information about an assembly is controlled through the following 4 | // set of attributes. Change these attribute values to modify the information 5 | // associated with an assembly. 6 | [assembly: AssemblyTitle("SZ")] 7 | [assembly: AssemblyDescription("A SharpZipLib sample program")] 8 | [assembly: AssemblyCulture("")] 9 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/sz/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/unzipfile/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/unzipfile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | // General Information about an assembly is controlled through the following 4 | // set of attributes. Change these attribute values to modify the information 5 | // associated with an assembly. 6 | [assembly: AssemblyTitle("UnZipFile")] 7 | [assembly: AssemblyDescription("A SharpZipLib sample program")] 8 | [assembly: AssemblyCulture("")] 9 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/unzipfile/UnZipFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using ICSharpCode.SharpZipLib.Zip; 4 | 5 | 6 | class UnZipFileClass 7 | { 8 | public static void Main(string[] args) 9 | { 10 | // Perform simple parameter checking. 11 | if ( args.Length < 1 ) { 12 | Console.WriteLine("Usage UnzipFile NameOfFile"); 13 | return; 14 | } 15 | 16 | if ( !File.Exists(args[0]) ) { 17 | Console.WriteLine("Cannot find file '{0}'", args[0]); 18 | return; 19 | } 20 | 21 | using (ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]))) { 22 | 23 | ZipEntry theEntry; 24 | while ((theEntry = s.GetNextEntry()) != null) { 25 | 26 | Console.WriteLine(theEntry.Name); 27 | 28 | string directoryName = Path.GetDirectoryName(theEntry.Name); 29 | string fileName = Path.GetFileName(theEntry.Name); 30 | 31 | // create directory 32 | if ( directoryName.Length > 0 ) { 33 | Directory.CreateDirectory(directoryName); 34 | } 35 | 36 | if (fileName != String.Empty) { 37 | using (FileStream streamWriter = File.Create(theEntry.Name)) { 38 | 39 | int size = 2048; 40 | byte[] data = new byte[2048]; 41 | while (true) { 42 | size = s.Read(data, 0, data.Length); 43 | if (size > 0) { 44 | streamWriter.Write(data, 0, size); 45 | } else { 46 | break; 47 | } 48 | } 49 | } 50 | } 51 | } 52 | } 53 | } 54 | } 55 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/unzipfile/readme.txt: -------------------------------------------------------------------------------- 1 | viewzipfile 2 | ----------- 3 | 4 | Usage: 5 | 6 | 7 | unzipfile [filename] 8 | 9 | will unzip the contents of the zipfile [filename] -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/viewzipfile/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/viewzipfile/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | // General Information about an assembly is controlled through the following 4 | // set of attributes. Change these attribute values to modify the information 5 | // associated with an assembly. 6 | [assembly: AssemblyTitle("ViewZipFile")] 7 | [assembly: AssemblyDescription("A SharpZipLib sample program")] 8 | [assembly: AssemblyCulture("")] 9 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/viewzipfile/ViewZipFile.cs: -------------------------------------------------------------------------------- 1 | using System; 2 | using System.IO; 3 | using System.Text; 4 | using ICSharpCode.SharpZipLib.Zip; 5 | 6 | 7 | class ViewZipFileClass 8 | { 9 | public static void Main(string[] args) 10 | { 11 | // Perform simple parameter checking. 12 | if ( args.Length < 1 ) { 13 | Console.WriteLine("Usage ViewZipFile NameOfFile"); 14 | return; 15 | } 16 | 17 | if ( !File.Exists(args[0]) ) { 18 | Console.WriteLine("Cannot find file '{0}'", args[0]); 19 | return; 20 | } 21 | 22 | // For IO there should be exception handling but in this case its been ommitted 23 | 24 | byte[] data = new byte[4096]; 25 | 26 | using (ZipInputStream s = new ZipInputStream(File.OpenRead(args[0]))) { 27 | 28 | ZipEntry theEntry; 29 | while ((theEntry = s.GetNextEntry()) != null) { 30 | Console.WriteLine("Name : {0}", theEntry.Name); 31 | Console.WriteLine("Date : {0}", theEntry.DateTime); 32 | Console.WriteLine("Size : (-1, if the size information is in the footer)"); 33 | Console.WriteLine(" Uncompressed : {0}", theEntry.Size); 34 | Console.WriteLine(" Compressed : {0}", theEntry.CompressedSize); 35 | 36 | if ( theEntry.IsFile ) { 37 | 38 | // Assuming the contents are text may be ok depending on what you are doing 39 | // here its fine as its shows how data can be read from a Zip archive. 40 | Console.Write("Show entry text (y/n) ?"); 41 | 42 | if (Console.ReadLine() == "y") { 43 | int size = s.Read(data, 0, data.Length); 44 | while (size > 0) { 45 | Console.Write(Encoding.ASCII.GetString(data, 0, size)); 46 | size = s.Read(data, 0, data.Length); 47 | } 48 | } 49 | Console.WriteLine(); 50 | } 51 | } 52 | 53 | // Close can be ommitted as the using statement will do it automatically 54 | // but leaving it here reminds you that is should be done. 55 | s.Close(); 56 | } 57 | } 58 | } 59 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/viewzipfile/readme.txt: -------------------------------------------------------------------------------- 1 | viewzipfile 2 | ----------- 3 | 4 | Usage: 5 | 6 | 7 | viewzipfile [filename] 8 | 9 | will view the contents of the zipfile [filename] -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/zf/Properties/AssemblyInfo.cs: -------------------------------------------------------------------------------- 1 | using System.Reflection; 2 | 3 | // General Information about an assembly is controlled through the following 4 | // set of attributes. Change these attribute values to modify the information 5 | // associated with an assembly. 6 | [assembly: AssemblyTitle("ZF")] 7 | [assembly: AssemblyDescription("A SharpZipLib sample program")] 8 | [assembly: AssemblyCulture("")] 9 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/cs/zf/app.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/CreateZipFile/CreateZipFile.MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/samples/ICSharpCode.SharpZipLib.Samples/vb/CreateZipFile/CreateZipFile.MainForm.resources -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/CreateZipFile/MainForm.resources: -------------------------------------------------------------------------------- https://raw.githubusercontent.com/icsharpcode/SharpZipLib/ff2d7c30bdb2474d507f001bc555405e9f02a0bb/samples/ICSharpCode.SharpZipLib.Samples/vb/CreateZipFile/MainForm.resources -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/CreateZipFile/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Reflection 2 | Imports System.Runtime.InteropServices 3 | 4 | ' General Information about an assembly is controlled through the following 5 | ' set of attributes. Change these attribute values to modify the information 6 | ' associated with an assembly. 7 | 8 | ' Review the values of the assembly attributes 9 | 10 | 11 | 12 | 13 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 14 | 15 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/CreateZipFile/app.config: -------------------------------------------------------------------------------- 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/SampleAssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Reflection 2 | Imports System.Runtime.InteropServices 3 | 4 | ' General Information about an assembly is controlled through the following 5 | ' set of attributes. Change these attribute values to modify the information 6 | ' associated with an assembly. 7 | 8 | ' Review the values of the assembly attributes 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | ' Version information for an assembly consists of the following four values: 19 | ' 20 | ' Major Version 21 | ' Minor Version 22 | ' Build Number 23 | ' Revision 24 | ' 25 | ' You can specify all the values or you can default the Build and Revision Numbers 26 | ' by using the '*' as shown below: 27 | ' 28 | 29 | 30 | 31 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/WpfCreateZipFile/App.config: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12 | 13 | 14 | 15 | 16 | 17 | 18 | 19 | 20 | 21 | 22 | 23 | 24 | 25 | 26 | 27 | 28 | 29 | 30 | 31 | 32 | 33 | 34 | 35 | 36 | 37 | 38 | 39 | 40 | 41 | 42 | 43 | 44 | 45 | 46 | 47 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/WpfCreateZipFile/Application.xaml: -------------------------------------------------------------------------------- 1 |  6 | 7 | 8 | 9 | 10 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/WpfCreateZipFile/Application.xaml.vb: -------------------------------------------------------------------------------- 1 | Class Application 2 | 3 | ' Application-level events, such as Startup, Exit, and DispatcherUnhandledException 4 | ' can be handled in this file. 5 | 6 | End Class 7 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/WpfCreateZipFile/My Project/AssemblyInfo.vb: -------------------------------------------------------------------------------- 1 | Imports System.Reflection 2 | Imports System.Resources 3 | Imports System.Runtime.InteropServices 4 | 5 | ' General Information about an assembly is controlled through the following 6 | ' set of attributes. Change these attribute values to modify the information 7 | ' associated with an assembly. 8 | 9 | ' Review the values of the assembly attributes 10 | 11 | 12 | 13 | 14 | 'In order to begin building localizable applications, set 15 | 'CultureYouAreCodingWith in your .vbproj file 16 | 'inside a . For example, if you are using US english 17 | 'in your source files, set the to "en-US". Then uncomment the 18 | 'NeutralResourceLanguage attribute below. Update the "en-US" in the line 19 | 'below to match the UICulture setting in the project file. 20 | 21 | 22 | 23 | 24 | 'The ThemeInfo attribute describes where any theme specific and generic resource dictionaries can be found. 25 | '1st parameter: where theme specific resource dictionaries are located 26 | '(used if a resource is not found in the page, 27 | ' or application resource dictionaries) 28 | 29 | '2nd parameter: where the generic resource dictionary is located 30 | '(used if a resource is not found in the page, 31 | 'app, and any theme specific resource dictionaries) 32 | 33 | 34 | 35 | 36 | 'The following GUID is for the ID of the typelib if this project is exposed to COM 37 | 38 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/WpfCreateZipFile/My Project/Settings.settings: -------------------------------------------------------------------------------- 1 |  2 | 3 | 4 | 5 | 6 | 7 | -------------------------------------------------------------------------------- /samples/ICSharpCode.SharpZipLib.Samples/vb/WpfCreateZipFile/WpfCreateZipFileWindow.xaml: -------------------------------------------------------------------------------- 1 |  9 | 10 | 11 | 12 | 13 | 14 | 15 |