Skip to content

Instantly share code, notes, and snippets.

@csghone
Last active May 7, 2020 07:03
Show Gist options
  • Save csghone/6ad70509f25c520d9ccfac8d845248a2 to your computer and use it in GitHub Desktop.
Save csghone/6ad70509f25c520d9ccfac8d845248a2 to your computer and use it in GitHub Desktop.
CFFI Python Example - Part 2/2
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