{"id":18175082,"url":"https://github.com/sailro/llziplib","last_synced_at":"2025-08-06T13:27:07.889Z","repository":{"id":144133955,"uuid":"52701576","full_name":"sailro/LLZipLib","owner":"sailro","description":"Low-level Zip Library, allowing advanced tweaks (injecting/removing blocks, crafting special archives)","archived":false,"fork":false,"pushed_at":"2024-11-14T07:39:47.000Z","size":4461,"stargazers_count":35,"open_issues_count":0,"forks_count":5,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-27T12:17:22.252Z","etag":null,"topics":["crafting","injecting","low-level","zip"],"latest_commit_sha":null,"homepage":"","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/sailro.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","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},"funding":{"github":"sailro","patreon":"sailro"}},"created_at":"2016-02-28T03:00:19.000Z","updated_at":"2025-02-13T01:17:43.000Z","dependencies_parsed_at":null,"dependency_job_id":"ec39c11d-cc4e-426a-8e66-54cd75ab6b41","html_url":"https://github.com/sailro/LLZipLib","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailro%2FLLZipLib","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailro%2FLLZipLib/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailro%2FLLZipLib/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/sailro%2FLLZipLib/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/sailro","download_url":"https://codeload.github.com/sailro/LLZipLib/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":246624173,"owners_count":20807487,"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":["crafting","injecting","low-level","zip"],"created_at":"2024-11-02T16:08:44.458Z","updated_at":"2025-04-01T16:31:18.936Z","avatar_url":"https://github.com/sailro.png","language":"C#","funding_links":["https://github.com/sponsors/sailro","https://patreon.com/sailro"],"categories":[],"sub_categories":[],"readme":"# LLZipLib \n[![Build status](https://github.com/sailro/LLZipLib/workflows/CI/badge.svg)](https://github.com/sailro/LLZipLib/actions?query=workflow%3ACI)\n[![NuGet](https://img.shields.io/nuget/v/LLZipLib.svg)](https://www.nuget.org/packages/LLZipLib/)\n\nLow-level Zip Library, allowing advanced tweaks (injecting/removing extra blocks, altering flags, crafting special archives). Self contained, no third party dependencies. If you just want to unzip files, this is not for you :)\n\n.ZIP File Format Specification:\nhttps://pkware.cachefly.net/webdocs/casestudies/APPNOTE.TXT\n\nHow to use it:\n\n## Changing file content\n```csharp\nvar zip = ZipArchive.Read(filename);\n\nvar entry = zip.Entries.FirstOrDefault(e =\u003e e.LocalFileHeader.Filename == \"readme.txt\");\nif (entry != null)\n{\n\tentry.Data = zip.StringConverter.GetBytes(\"This is my new content\", StringConverterContext.Content);\n\t// this is not compressed\n\tentry.LocalFileHeader.Compression = entry.CentralDirectoryHeader.Compression = 0;\n}\n\nzip.Write(filename);\n```\n\n## Processing file names\n```csharp\nvar zip = ZipArchive.Read(filename);\n\nforeach (var entry in zip.Entries)\n{\n\tentry.LocalFileHeader.Filename = \"foo.\" + entry.LocalFileHeader.Filename;\n\tentry.CentralDirectoryHeader.Filename = entry.LocalFileHeader.Filename;\n}\n\nzip.Write(filename);\n```\n\n## Creating archive / adding entry\n```csharp\nvar zip = new ZipArchive();\nvar entry = new ZipEntry();\n\nzip.Entries.Add(entry);\nentry.LocalFileHeader.Filename = entry.CentralDirectoryHeader.Filename = \"foo.txt\";\nentry.Data = zip.StringConverter.GetBytes(\"Hello world!\", StringConverterContext.Content);\n\nzip.Write(\"foo.zip\");\n```\n\n## Removing all data descriptors\n```csharp\nvar zip = ZipArchive.Read(filename);\n\nforeach (var entry in zip.Entries.Where(entry =\u003e entry.HasDataDescriptor))\n{\n\tentry.LocalFileHeader.CompressedSize = entry.DataDescriptor.CompressedSize;\n\tentry.LocalFileHeader.UncompressedSize = entry.DataDescriptor.UncompressedSize;\n\tentry.LocalFileHeader.Crc = entry.DataDescriptor.Crc;\n\tentry.HasDataDescriptor = false; \n}\n\nzip.Write(filename);\n```\n\n## Removing all extra blocks\n```csharp\nvar zip = ZipArchive.Read(filename);\n\nforeach (var entry in zip.Entries)\n{\n\tentry.LocalFileHeader.Extra = new byte[0];\n\tentry.CentralDirectoryHeader.Extra = new byte[0];\n}\n\nzip.Write(filename);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsailro%2Fllziplib","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsailro%2Fllziplib","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsailro%2Fllziplib/lists"}