{"id":22551765,"url":"https://github.com/cube-soft/cube.filesystem.sevenzip","last_synced_at":"2025-04-05T06:06:49.101Z","repository":{"id":45207187,"uuid":"106358969","full_name":"cube-soft/cube.filesystem.sevenzip","owner":"cube-soft","description":"CubeICE and 7-Zip wrapper library for .NET","archived":false,"fork":false,"pushed_at":"2025-02-18T05:32:13.000Z","size":12079,"stargazers_count":55,"open_issues_count":0,"forks_count":9,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-04-02T21:11:18.633Z","etag":null,"topics":["7-zip","7z","csharp","cube","dotnet","net35","net45","sevenzip","zip"],"latest_commit_sha":null,"homepage":"https://www.cube-soft.jp/cubeice/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/cube-soft.png","metadata":{"files":{"readme":"Readme.md","changelog":null,"contributing":null,"funding":null,"license":"License.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2017-10-10T02:30:18.000Z","updated_at":"2025-03-28T10:40:38.000Z","dependencies_parsed_at":"2024-01-08T13:40:36.057Z","dependency_job_id":"7070f05c-0dbd-43db-8884-2f66655f6f1e","html_url":"https://github.com/cube-soft/cube.filesystem.sevenzip","commit_stats":null,"previous_names":[],"tags_count":84,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube-soft%2Fcube.filesystem.sevenzip","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube-soft%2Fcube.filesystem.sevenzip/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube-soft%2Fcube.filesystem.sevenzip/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/cube-soft%2Fcube.filesystem.sevenzip/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/cube-soft","download_url":"https://codeload.github.com/cube-soft/cube.filesystem.sevenzip/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247294536,"owners_count":20915340,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["7-zip","7z","csharp","cube","dotnet","net35","net45","sevenzip","zip"],"created_at":"2024-12-07T17:14:15.254Z","updated_at":"2025-04-05T06:06:49.083Z","avatar_url":"https://github.com/cube-soft.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"Cube.FileSystem.SevenZip\n====\n\n[![Package](https://badgen.net/nuget/v/cube.filesystem.sevenzip)](https://www.nuget.org/packages/cube.filesystem.sevenzip/)\n[![AppVeyor](https://badgen.net/appveyor/ci/clown/cube-filesystem-sevenzip)](https://ci.appveyor.com/project/clown/cube-filesystem-sevenzip)\n[![Codecov](https://badgen.net/codecov/c/github/cube-soft/cube.filesystem.sevenzip)](https://codecov.io/gh/cube-soft/cube.filesystem.sevenzip)\n\nCube.FileSystem.SevenZip is a wrapper library of the [7-Zip](http://www.7-zip.org/) via COM interface. The project also has an application for compressing or extracting archives, which name is [CubeICE](https://www.cube-soft.jp/cubeice/). Libraries and applications are available for .NET Framework 3.5, 4.5 or later. Note that some projects are licensed under the GNU LGPLv3 and the others under the Apache 2.0. See [License.md](https://github.com/cube-soft/Cube.FileSystem.SevenZip/blob/master/License.md) for more information.\n\n## Usage\n\nYou can install the library through the NuGet package.\nAdd dependencies in your project file or select it from the NuGet packages UI on Visual Studio.\n\n### Examples for archiving files\n\nA simple example for archiving files is as follows.\nNote that the statement \"using Cube.FileSystem.SevenZip;\" has been omitted in all samples.\n\n```cs\n// Set only what you need.\nvar files   = new[] { \".DS_Store\", \"Thumbs.db\", \"__MACOSX\", \"desktop.ini\" };\nvar options = new CompressionOption\n{\n    CompressionLevel  = CompressionLevel.Ultra,\n    CompressionMethod = CompressionMethod.Lzma,\n    EncryptionMethod  = EncryptionMethod.Aes256,\n    Password          = \"password\",\n    Filter            = Filter.From(files),\n    CodePage          = CodePage.Utf8,\n};\n\nusing (var writer = new ArchiveWriter(Format.Zip, options))\n{\n    writer.Add(@\"path\\to\\file\");\n    writer.Add(@\"path\\to\\directory_including_files\");\n    \n    var progress = new Progress\u003cReport\u003e(e =\u003e DoSomething(e));\n    writer.Save(@\"path\\to\\save.zip\", progress);\n}\n```\n\nYou create an ArchiveWriter object with an archiving format (e.g. Zip, SevenZip, ...),\nadd files and/or directories you want to archive, set some additional options, and finally call the Save method.\nWhen you create Tar based archives, you can use a TarOption object for selecting a compression method.\n\n```cs\nvar options = new CompressionOption\n{\n    CompressionLevel  = CompressionLevel.Ultra,\n    CompressionMethod = CompressionMethod.BZip2, // GZip, BZip2, XZ or Copy\n};\n\nusing (var writer = new ArchiveWriter(Format.Tar, options))\n{\n    writer.Add(@\"path\\to\\file\");\n    writer.Add(@\"path\\to\\directory_including_files\");\n    writer.Save(@\"path\\to\\save.tar.gz\");\n}\n```\n\n### Examples for extracting archives\n\nIf you want to extract all files from the archive, you create an ArchiveReader object\nand call the Extract method. The 2nd argument of the constructor, that means the\npassword of the archive, can be set string or Cube.Query\u0026lt;string\u0026gt; object.\nThe latter is mainly used for implementing the interactive mode.\n\n```cs\n// Set password directly or using Query\u003cstring\u003e\nvar password = new Cube.Query\u003cstring\u003e(e =\u003e\n{\n    e.Result = \"password\";\n    e.Cancel = false;\n});\n\n// Supports only the Filter property\nvar files   = new[] { \".DS_Store\", \"Thumbs.db\", \"__MACOSX\", \"desktop.ini\" };\nvar options = new ArchiveOption { Filter = Filter.From(files) };\n\nusing (var reader = new ArchiveReader(@\"path\\to\\archive\", password, options))\n{\n    var progress = new Progress\u003cReport\u003e(e =\u003e DoSomething(e));\n    reader.Save(@\"path\\to\\directory\", progress);\n}\n```\n\nNote that ArchiveWriter and ArchiveReader classes need to execute in the same thread from constructing to destroying.\nUse Task.Run() in the whole transaction if you need to archive or extract files asynchronously.\n\n## Dependencies\n\n* [7-Zip](https://www.7-zip.org/) ... [Cube.Native.SevenZip](https://github.com/cube-soft/Cube.Native.SevenZip) is optimized for Japanese encoding.\n* [AlphaFS](https://alphafs.alphaleonis.com/) ... [Cube.FileSystem.AlphaFS](https://www.nuget.org/packages/Cube.FileSystem.AlphaFS/) is a wrapper library for using AlphaFS in Cube projects.\n\n## Contributing\n\n1. Fork [Cube.FileSystem.SevenZip](https://github.com/cube-soft/Cube.FileSystem.SevenZip/fork) repository.\n2. Create a feature branch from the master (e.g. git checkout -b my-new-feature origin/master). Note that the master branch may refer some pre-released NuGet packages. Try the [rake clean](https://github.com/cube-soft/Cube.FileSystem.SevenZip/blob/master/Rakefile) command when build errors occur.\n3. Commit your changes.\n4. Rebase your local changes against the master branch.\n5. Run the dotnet test command or the Visual Studio (NUnit 3 test adapter) and confirm that it passes.\n6. Create new Pull Request.\n\n## License\n \nCopyright © 2010 [CubeSoft, Inc.](http://www.cube-soft.jp/)\nSee [License.md](https://github.com/cube-soft/Cube.FileSystem.SevenZip/blob/master/License.md) for more information.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcube-soft%2Fcube.filesystem.sevenzip","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fcube-soft%2Fcube.filesystem.sevenzip","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fcube-soft%2Fcube.filesystem.sevenzip/lists"}