{"id":22538409,"url":"https://github.com/shuttle/shuttle.core.compression","last_synced_at":"2025-04-09T20:22:48.411Z","repository":{"id":43002357,"uuid":"115990946","full_name":"Shuttle/Shuttle.Core.Compression","owner":"Shuttle","description":"Compression adapter.","archived":false,"fork":false,"pushed_at":"2025-02-02T11:18:20.000Z","size":101,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-08T23:13:48.878Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Shuttle.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"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}},"created_at":"2018-01-02T08:07:57.000Z","updated_at":"2025-02-02T10:35:49.000Z","dependencies_parsed_at":"2024-06-21T07:32:35.169Z","dependency_job_id":"a3ef575b-ca72-4d46-969d-c6e4af6555df","html_url":"https://github.com/Shuttle/Shuttle.Core.Compression","commit_stats":null,"previous_names":[],"tags_count":5,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuttle%2FShuttle.Core.Compression","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuttle%2FShuttle.Core.Compression/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuttle%2FShuttle.Core.Compression/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Shuttle%2FShuttle.Core.Compression/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Shuttle","download_url":"https://codeload.github.com/Shuttle/Shuttle.Core.Compression/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248104901,"owners_count":21048419,"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":[],"created_at":"2024-12-07T11:11:57.865Z","updated_at":"2025-04-09T20:22:48.382Z","avatar_url":"https://github.com/Shuttle.png","language":"C#","readme":"# Shuttle.Core.Compression\n\n```\nPM\u003e Install-Package Shuttle.Core.Compression\n```\n\nProvides a compression adapter through the `ICompressionAlgorithm` interface.\n\nImplementations available in this package:\n\n- `DeflateCompressionAlgorithm`\n- `GZipCompressionAlgorithm`\n- `NullCompressionAlgorithm`\n\nThere is also an `ICompressionService` that acts as a central container for all registered `ICompressionAlgorithm` implementations.\n\n## Configuration\n\nIn order to add compression:\n\n```c#\nservices.AddCompression();\n```\n\nThis will try to add the `CompressionService` singleton.\n\nIn order to add specific compression algorithms use the relevant builder calls:\n\n```c#\nservices.AddCompression(builder =\u003e {\n\tbuilder.AddGzip();\n\tbuilder.AddDeflate();\n\tbuilder.AddNull();\n});\n```\n\n## Usage\n\nThe `ICompressionService` can be injected into any class that requires compression services:\n\n```c#\nvar algorithm = compressionService.Get(\"algorithm-name\");\nvar compressed = await algorithm.CompressAsync(Encoding.UTF8.GetBytes(\"some data\"));\nvar decompressed = await algorithm.DecompressAsync(compressed);\n```","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuttle%2Fshuttle.core.compression","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshuttle%2Fshuttle.core.compression","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshuttle%2Fshuttle.core.compression/lists"}