CHN-beta / brotli-cpp

A lightweight wrap for Google's Brotli library, in C++ style.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

What is this?

This is a lightweight wrap for Google's Brotli compression library, in C++ style.

How to use?

It is very simple. Just see the example.

# include <brotli-cpp.hpp>
# include <iostream>
int main()
{
    std::string origin = "hello world!";
    std::string compressed = brotli::compress(origin);
    std::string decompressed = brotli::decompress(compressed);
    std::cout << std::boolalpha << (origin == decompressed);
    return 0;
}

When compile, do not forget to add -lbrotlienc -lbrotlidec.

About

A lightweight wrap for Google's Brotli library, in C++ style.


Languages

Language:C++ 100.0%