-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add brotly as compression algorithm and make it optional, as well as …
…zstd due to binary file size
- Loading branch information
Showing
6 changed files
with
72 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#include "algo-zlib.h" | ||
|
||
#include "../lib/brotli/c/include/brotli/encode.h" | ||
#include "../lib/brotli/c/include/brotli/decode.h" | ||
|
||
void brotli_init() | ||
{ | ||
} | ||
|
||
void brotli_compress(uint8_t *input, size_t insize, uint8_t *output, size_t *outsize) | ||
{ | ||
BrotliEncoderCompress(1, 10, BROTLI_DEFAULT_MODE, insize, input, outsize, output); | ||
} | ||
|
||
void brotli_uncompress(uint8_t *input, size_t insize, uint8_t *output, size_t *outsize) | ||
{ | ||
BrotliDecoderDecompress(insize, input, outsize, output); | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
#ifndef __ALGO_BROTLI_H__ | ||
#define __ALGO_BROTLI_H__ | ||
|
||
#include "pico/stdlib.h" | ||
|
||
void brotli_init(); | ||
void brotli_compress(uint8_t* input, size_t insize, uint8_t* output, size_t* outsize); | ||
void brotli_uncompress(uint8_t* input, size_t insize, uint8_t* output, size_t* outsize); | ||
|
||
#endif // __ALGO_BROTLI_H__ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters