{"id":38060376,"url":"https://github.com/andreiamatuni/zstdpp","last_synced_at":"2026-01-16T20:29:09.550Z","repository":{"id":193414795,"uuid":"83492559","full_name":"andreiamatuni/zstdpp","owner":"andreiamatuni","description":"C++ wrapper for libzstd compression functions","archived":false,"fork":false,"pushed_at":"2025-04-16T16:08:47.000Z","size":8,"stargazers_count":8,"open_issues_count":0,"forks_count":1,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-04-16T23:58:54.548Z","etag":null,"topics":["compression","zstandard","zstd"],"latest_commit_sha":null,"homepage":null,"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/andreiamatuni.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}},"created_at":"2017-03-01T00:17:31.000Z","updated_at":"2025-04-16T16:08:51.000Z","dependencies_parsed_at":"2023-09-08T04:55:45.928Z","dependency_job_id":null,"html_url":"https://github.com/andreiamatuni/zstdpp","commit_stats":null,"previous_names":["andreiamatuni/zstdpp"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/andreiamatuni/zstdpp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiamatuni%2Fzstdpp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiamatuni%2Fzstdpp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiamatuni%2Fzstdpp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiamatuni%2Fzstdpp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/andreiamatuni","download_url":"https://codeload.github.com/andreiamatuni/zstdpp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/andreiamatuni%2Fzstdpp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28482267,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-16T11:59:17.896Z","status":"ssl_error","status_checked_at":"2026-01-16T11:55:55.838Z","response_time":107,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":["compression","zstandard","zstd"],"created_at":"2026-01-16T20:29:09.441Z","updated_at":"2026-01-16T20:29:09.526Z","avatar_url":"https://github.com/andreiamatuni.png","language":"C++","readme":"# ZSTDPP\n\nA single file header only C++ convenience wrapper around the [libzstd](https://github.com/facebook/zstd) compression/decompression functions.\n\nWe use std::vector\\\u003cstd::uint8_t\\\u003e \u0026 std::string objects as memory containers, and pass them into the zstdpp::compress() and zstd::decompress() functions. These functions return a std::vector\\\u003cstd::uint8_t\\\u003e, who's underlying data is either a compressed or decompressed version of the original.\n\nThere are also in-place versions of the functions, which take a preallocated memory buffer as an argument. This is useful if you're doing a lot of compression/decompression in a loop, and you want to avoid allocatins, which accept a std::string as argument, acting as a preallocated memory buffer to perform compression/decompression (instead of allocating a new buffer on each function call). This helps if you're doing a lot of compression/decompression in a loop.\n\n# Example usage \n\n```c++\n#include \u003cstring\u003e\n#include \u003ciostream\u003e\n\n#include \"zstdpp.hpp\"\n\nint main() {\n  std::string input(\"this is a string that I want to compress into a smaller\\n\"\n                    \"string. Just to make sure there is enough data in the\\n\"\n                    \"compression buffer, I'm going to fill this string with a\\n\"\n                    \"decent amount of content. Let's hope this works.\\n\");\n\n  auto compressed = zstdpp::compress(input, 22);\n\n  auto decompressed = zstdpp::decompress(compressed);\n\n}\n```\n\n\n# Example usage of in-place functions\n\n```c++\n#include \u003cstring\u003e\n#include \u003ciostream\u003e\n\n#include \"zstdpp.hpp\"\n\nint main() {\n    std::string input(\"this is a string that I want to compress into a smaller\\n\"\n                      \"string. Just to make sure there is enough data in the\\n\"\n                      \"compression buffer, I'm going to fill this string with a\\n\"\n                      \"decent amount of content. Let's hope this works.\\n\");\n    // we're going to use the in-place functions, so we need to allocate a buffer\n    std::string buffer_compress{}, buffer_decompress{};\n    \n    auto compressed_size = zstdpp::inplace::compress(input, buffer_compress, 22);\n  \n    auto decompressed_size = zstdpp::inplace::decompress(buffer_compress, buffer_decompress);\n}\n```\n\n### For more examples, check the tests folder.","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreiamatuni%2Fzstdpp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fandreiamatuni%2Fzstdpp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fandreiamatuni%2Fzstdpp/lists"}