{"id":24801248,"url":"https://github.com/lalakii/zstd.netframework","last_synced_at":"2026-02-11T06:31:44.221Z","repository":{"id":272196955,"uuid":"915755585","full_name":"lalakii/Zstd.NetFramework","owner":"lalakii","description":"Zstd Wrappers for .Net Framework.","archived":false,"fork":false,"pushed_at":"2025-01-28T18:05:38.000Z","size":2254,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"master","last_synced_at":"2025-01-28T19:22:07.447Z","etag":null,"topics":["csharp-library","libzstd","pinvoke-wrapper","zstd","zstd-zstandard-compress-decompress"],"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/lalakii.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":"2025-01-12T18:05:19.000Z","updated_at":"2025-01-28T18:05:42.000Z","dependencies_parsed_at":"2025-01-12T21:30:15.913Z","dependency_job_id":"4c81c2bb-0815-4087-83d4-ffe15fcd3d9d","html_url":"https://github.com/lalakii/Zstd.NetFramework","commit_stats":null,"previous_names":["lalakii/zstd.netframework"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalakii%2FZstd.NetFramework","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalakii%2FZstd.NetFramework/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalakii%2FZstd.NetFramework/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/lalakii%2FZstd.NetFramework/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/lalakii","download_url":"https://codeload.github.com/lalakii/Zstd.NetFramework/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":236294668,"owners_count":19125892,"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":["csharp-library","libzstd","pinvoke-wrapper","zstd","zstd-zstandard-compress-decompress"],"created_at":"2025-01-30T04:19:52.285Z","updated_at":"2025-10-13T02:31:59.348Z","avatar_url":"https://github.com/lalakii.png","language":"C#","readme":"# Zstd.NetFramework\r\n\r\n[![Available on NuGet https://www.nuget.org/packages?q=Zstd.NetFramework](https://img.shields.io/nuget/v/Zstd.NetFramework.svg?logo=nuget)](https://www.nuget.org/packages?q=Zstd.NetFramework)\r\n[![Codacy Badge](https://app.codacy.com/project/badge/Grade/3b7b281a35064adc9642b7845b38becf)](https://app.codacy.com/gh/lalakii/Zstd.NetFramework/dashboard?utm_source=gh\u0026utm_medium=referral\u0026utm_content=\u0026utm_campaign=Badge_grade)\r\n\r\nThis is a Wrappers based on P/Invoke implementations.\r\n\r\nFunctions implemented by calling [facebook/zstd](https://github.com/facebook/zstd)(release).\r\n\r\n## API\r\n\r\n```cs\r\nZstd.Compress(byte[] src, int level)\r\n\r\nZstd.Decompress(byte[] src, int dstCapacity)\r\n\r\nZstd.CompressStream(Stream src, Stream dst, int level)\r\n\r\nZstd.DecompressStream(Stream src, Stream dst)\r\n\r\nZstd.CompressStream2SimpleArgs(Stream src, Stream dst, int level)\r\n\r\nZstd.DecompressStreamSimpleArgs(Stream src, Stream dst)\r\n\r\nZstd.FreeLibrary();\r\n```\r\n\r\n## Demo\r\n\r\n```cs\r\nusing CN.Lalaki.Zstd;\r\nusing System.IO;\r\nusing System;\r\n// ...sample code\r\nusing (var cstream = File.OpenRead(\"path\\\\of\\\\example.zst\"))\r\n{\r\n    MemoryStream destream = new MemoryStream();\r\n    // Decompress Stream\r\n    Zstd.DecompressStream(cstream, destream);\r\n    var c2stream = new MemoryStream();\r\n    destream.Seek(0, SeekOrigin.Begin);\r\n    // Compress Stream\r\n    Zstd.CompressStream(destream, c2stream, 3);\r\n    // Decompress Byte Array\r\n    const int bufferSize = 1024 * 1024 * 20; // if 20MB, must be larger than original file size\r\n    var dData = Zstd.Decompress(c2stream.ToArray(), bufferSize);\r\n    Console.WriteLine(\"Decompress Size: {0}\", dData.Length);\r\n    // Compress Byte Array\r\n    var cData = Zstd.Compress(dData, 3);\r\n    Console.WriteLine(\"Compress Size {0}\", cData.Length);\r\n}\r\n```\r\n\r\n## License\r\n\r\n[MIT](https://github.com/lalakii/Zstd.NetFramework/blob/master/LICENSE)\r\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalakii%2Fzstd.netframework","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Flalakii%2Fzstd.netframework","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Flalakii%2Fzstd.netframework/lists"}