You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I would like to be able to read archives from memory, however the Archive class doesn't allow that. If you try to pass it using BytesIO it fails because it has a non-functional fileno property (there's no actual file descriptor open). libarchive has a function that seems to support this in archive_read_open_memory(arg1, buff, size) but I cannot seem to convert a python bytes object to the correct type required by that function using ctypes. Everything I've tried ends up with the error:
TypeError: in method 'archive_read_open_memory', argument 2 of type 'void const *'
Could you show the correct way to pass python bytes to that function argument buff? Thanks.
The text was updated successfully, but these errors were encountered:
I would like to be able to read archives from memory, however the
Archive
class doesn't allow that. If you try to pass it usingBytesIO
it fails because it has a non-functionalfileno
property (there's no actual file descriptor open). libarchive has a function that seems to support this inarchive_read_open_memory(arg1, buff, size)
but I cannot seem to convert a pythonbytes
object to the correct type required by that function using ctypes. Everything I've tried ends up with the error:TypeError: in method 'archive_read_open_memory', argument 2 of type 'void const *'
Could you show the correct way to pass python bytes to that function argument buff? Thanks.
The text was updated successfully, but these errors were encountered: