Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
C
cython-zstd
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
cython-zstd
Commits
cc72acdd
Commit
cc72acdd
authored
Aug 28, 2018
by
Julien Muchembled
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add version()
parent
814268cd
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
0 deletions
+9
-0
zstd/_bindings.pyx
zstd/_bindings.pyx
+9
-0
No files found.
zstd/_bindings.pyx
View file @
cc72acdd
...
@@ -16,6 +16,7 @@ cdef extern from "Python.h":
...
@@ -16,6 +16,7 @@ cdef extern from "Python.h":
cdef
extern
from
"zstd.h"
:
cdef
extern
from
"zstd.h"
:
# To simplify implementation, we use signed types (and detect errors with
# To simplify implementation, we use signed types (and detect errors with
# negative values). Anyway, that's what `bytes` uses for its length.
# negative values). Anyway, that's what `bytes` uses for its length.
int
ZSTD_versionNumber
()
ssize_t
ZSTD_compressBound
(
ssize_t
srcSize
)
ssize_t
ZSTD_compressBound
(
ssize_t
srcSize
)
const
char
*
ZSTD_getErrorName
(
ssize_t
code
)
const
char
*
ZSTD_getErrorName
(
ssize_t
code
)
int
ZSTD_maxCLevel
()
int
ZSTD_maxCLevel
()
...
@@ -26,6 +27,14 @@ cdef extern from "zstd.h":
...
@@ -26,6 +27,14 @@ cdef extern from "zstd.h":
ssize_t
ZSTD_decompress
(
void
*
dst
,
ssize_t
dstCapacity
,
ssize_t
ZSTD_decompress
(
void
*
dst
,
ssize_t
dstCapacity
,
const
void
*
src
,
ssize_t
compressedSize
)
nogil
const
void
*
src
,
ssize_t
compressedSize
)
nogil
def
version
():
cdef
int
x
=
ZSTD_versionNumber
()
cdef
int
r
=
x
%
100
x
/=
100
return
x
/
100
,
x
%
100
,
r
version
=
version
()
def
maxCLevel
():
def
maxCLevel
():
return
ZSTD_maxCLevel
()
return
ZSTD_maxCLevel
()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment