File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change @@ -25,8 +25,19 @@ void lzss_flush();
25
25
class LZSSDecoder {
26
26
public:
27
27
28
+ /* *
29
+ * Build an LZSS decoder by providing a callback for storing the decoded bytes
30
+ * @param putc_cbk: a callback that takes a char and stores it e.g. a callback to fwrite
31
+ */
28
32
LZSSDecoder (std::function<void (const uint8_t )> putc_cbk);
29
33
34
+ /* *
35
+ * Build an LZSS decoder providing a callback for getting a char and putting a char
36
+ * in this way you need to call decompress with no parameters
37
+ * @param putc_cbk: a callback that takes a char and stores it e.g. a callback to fwrite
38
+ * @param getc_cbk: a callback that returns the next char to consume
39
+ * -1 means EOF, -2 means buffer is temporairly finished
40
+ */
30
41
LZSSDecoder (std::function<int ()> getc_cbk, std::function<void (const uint8_t )> putc_cbk);
31
42
32
43
/* *
@@ -43,7 +54,7 @@ class LZSSDecoder {
43
54
44
55
/* *
45
56
* decode the provided buffer until buffer ends, then pause the process
46
- * @return 0 if the decompression is completed, 1 if not
57
+ * @return DONE if the decompression is completed, NOT_COMPLETED if not
47
58
*/
48
59
status decompress (const char * buffer, uint32_t size);
49
60
private:
You can’t perform that action at this time.
0 commit comments