-
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 snappy-c in addition to the existing snappy library
- Loading branch information
Showing
6 changed files
with
43 additions
and
2 deletions.
There are no files selected for viewing
Submodule snappy-c
updated
8 files
+56 −2 | compat.h | |
+4 −4 | glue.c | |
+0 −3 | interfaceLibForPicoSDK.cmake | |
+4 −4 | scmd.c | |
+4 −4 | sgverify.c | |
+23 −23 | snappy.c | |
+8 −4 | snappy.h | |
+3 −3 | verify.c |
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 |
---|---|---|
@@ -1,4 +1,4 @@ | ||
#include "algo-zlib.h" | ||
#include "algo-snappy.h" | ||
|
||
#include "../lib/snappy/snappy-c.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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,20 @@ | ||
#include "algo-zlib.h" | ||
|
||
#include "../lib/snappy-c/snappy.h" | ||
|
||
struct snappy_env env; | ||
|
||
void mysnappyc_init() | ||
{ | ||
snappy_init_env(&env); | ||
} | ||
|
||
void mysnappyc_compress(uint8_t *input, size_t insize, uint8_t *output, size_t *outsize) | ||
{ | ||
SNAPPYC_FUNCTION_NAME_PREFIXsnappy_compress(&env, input, insize, output, outsize); | ||
} | ||
|
||
void mysnappyc_uncompress(uint8_t *input, size_t insize, uint8_t *output, size_t *outsize) | ||
{ | ||
SNAPPYC_FUNCTION_NAME_PREFIXsnappy_uncompress(input, insize, 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_SNAPPYC_H__ | ||
#define __ALGO_SNAPPYC_H__ | ||
|
||
#include "pico/stdlib.h" | ||
|
||
void mysnappyc_init(); | ||
void mysnappyc_compress(uint8_t* input, size_t insize, uint8_t* output, size_t* outsize); | ||
void mysnappyc_uncompress(uint8_t* input, size_t insize, uint8_t* output, size_t* outsize); | ||
|
||
#endif // __ALGO_SNAPPYC_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