Mercurial > public > mercurial-scm > hg
comparison contrib/python-zstandard/c-ext/python-zstandard.h @ 30822:b54a2984cdd4
zstd: vendor python-zstandard 0.6.0
Commit 63c68d6f5fc8de4afd9bde81b13b537beb4e47e8 from
https://github.com/indygreg/python-zstandard is imported without
modifications (other than removing unwanted files).
This includes minor performance and feature improvements. It also
changes the vendored zstd library from 1.1.1 to 1.1.2.
# no-check-commit
author | Gregory Szorc <gregory.szorc@gmail.com> |
---|---|
date | Sat, 14 Jan 2017 19:41:43 -0800 |
parents | b86a448a2965 |
children | c32454d69b85 |
comparison
equal
deleted
inserted
replaced
30821:7005c03f7387 | 30822:b54a2984cdd4 |
---|---|
13 #define ZDICT_STATIC_LINKING_ONLY | 13 #define ZDICT_STATIC_LINKING_ONLY |
14 #include "mem.h" | 14 #include "mem.h" |
15 #include "zstd.h" | 15 #include "zstd.h" |
16 #include "zdict.h" | 16 #include "zdict.h" |
17 | 17 |
18 #define PYTHON_ZSTANDARD_VERSION "0.5.0" | 18 #define PYTHON_ZSTANDARD_VERSION "0.6.0" |
19 | |
20 typedef enum { | |
21 compressorobj_flush_finish, | |
22 compressorobj_flush_block, | |
23 } CompressorObj_Flush; | |
19 | 24 |
20 typedef struct { | 25 typedef struct { |
21 PyObject_HEAD | 26 PyObject_HEAD |
22 unsigned windowLog; | 27 unsigned windowLog; |
23 unsigned chainLog; | 28 unsigned chainLog; |
52 typedef struct { | 57 typedef struct { |
53 PyObject_HEAD | 58 PyObject_HEAD |
54 | 59 |
55 int compressionLevel; | 60 int compressionLevel; |
56 ZstdCompressionDict* dict; | 61 ZstdCompressionDict* dict; |
62 ZSTD_CCtx* cctx; | |
57 ZSTD_CDict* cdict; | 63 ZSTD_CDict* cdict; |
58 CompressionParametersObject* cparams; | 64 CompressionParametersObject* cparams; |
59 ZSTD_frameParameters fparams; | 65 ZSTD_frameParameters fparams; |
60 } ZstdCompressor; | 66 } ZstdCompressor; |
61 | 67 |
65 PyObject_HEAD | 71 PyObject_HEAD |
66 | 72 |
67 ZstdCompressor* compressor; | 73 ZstdCompressor* compressor; |
68 ZSTD_CStream* cstream; | 74 ZSTD_CStream* cstream; |
69 ZSTD_outBuffer output; | 75 ZSTD_outBuffer output; |
70 int flushed; | 76 int finished; |
71 } ZstdCompressionObj; | 77 } ZstdCompressionObj; |
72 | 78 |
73 extern PyTypeObject ZstdCompressionObjType; | 79 extern PyTypeObject ZstdCompressionObjType; |
74 | 80 |
75 typedef struct { | 81 typedef struct { |