forked from travcunn/python-libarchive
-
Notifications
You must be signed in to change notification settings - Fork 15
Open
Description
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.
Metadata
Metadata
Assignees
Labels
No labels