Last active
May 7, 2020 07:03
-
-
Save csghone/6ad70509f25c520d9ccfac8d845248a2 to your computer and use it in GitHub Desktop.
CFFI Python Example - Part 2/2
This file contains hidden or 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
from cffi_example.lzo_ext import ffi, lib | |
# `compressed_data` is `bytes` array | |
# `compressed_data_len` is int | |
uncompressed_data = ffi.new("char[]", 10000) | |
ret_val = lib.decompress(compressed_data, compressed_data_len, uncompressed_data) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment