|
IDA SDK
|
Data compression functions.
Functions | |
| idaman THREAD_SAFE int ida_export | zip_deflate (void *ud, ssize_t(idaapi *file_reader)(void *ud, void *buf, size_t size), ssize_t(idaapi *file_writer)(void *ud, const void *buf, size_t size)) |
| Compress data. More... | |
| idaman THREAD_SAFE int ida_export | zip_inflate (void *ud, ssize_t(idaapi *file_reader)(void *ud, void *buf, size_t size), ssize_t(idaapi *file_writer)(void *ud, const void *buf, size_t size)) |
| Uncompress data. More... | |
| idaman THREAD_SAFE int ida_export | process_zipfile (const char *zipfile, int(idaapi *callback)( void *ud, qoff64_t offset, int method, uint64 csize, uint64 ucsize, uint32 attributes, const char *filename), void *ud=NULL) |
| Process zip file and enumerate all files stored in it. More... | |
| idaman THREAD_SAFE int ida_export | process_zip_linput (linput_t *li, int(idaapi *callback)( void *ud, qoff64_t offset, int method, uint64 csize, uint64 ucsize, uint32 attributes, const char *filename), void *ud=NULL) |
| Process zip file and enumerate all files stored in it. More... | |
| idaman THREAD_SAFE int ida_export | process_zipfile_entry (const char *zipfile, const char *entry, int(idaapi *callback)( void *ud, qoff64_t offset, int method, uint64 csize, uint64 ucsize, uint32 attributes, const char *filename), void *ud=NULL, bool case_sensitive=true) |
| Search for specified entry in zip file, and calls the callback with it, if found. More... | |
| idaman THREAD_SAFE linput_t *ida_export | create_zip_linput (linput_t *in, ssize_t insize=-1, linput_close_code_t loc=LOC_CLOSE) |
| Create a linput to read a compressed input stream. More... | |
Enumerations | |
| enum | linput_close_code_t { LOC_CLOSE, LOC_UNMAKE, LOC_KEEP } |
| Upon closing outer linput, perform one of these actions. More... | |
Variables | |
| bool | legacy_idb |
| for old idb files | |
| enum linput_close_code_t |
| idaman THREAD_SAFE int ida_export zip_deflate | ( | void * | ud, |
| ssize_t(idaapi *)(void *ud, void *buf, size_t size) | file_reader, | ||
| ssize_t(idaapi *)(void *ud, const void *buf, size_t size) | file_writer | ||
| ) |
Compress data.
This function depends on the value of legacy_idb, so it is not completely thread safe. However, legacy_idb does not change its value.
| idaman THREAD_SAFE int ida_export zip_inflate | ( | void * | ud, |
| ssize_t(idaapi *)(void *ud, void *buf, size_t size) | file_reader, | ||
| ssize_t(idaapi *)(void *ud, const void *buf, size_t size) | file_writer | ||
| ) |
Uncompress data.
This function depends on the value of legacy_idb, so it is not completely thread safe. However, legacy_idb does not change its value.
| idaman THREAD_SAFE int ida_export process_zipfile | ( | const char * | zipfile, |
| int(idaapi *)( void *ud, qoff64_t offset, int method, uint64 csize, uint64 ucsize, uint32 attributes, const char *filename) | callback, | ||
| void * | ud = NULL |
||
| ) |
Process zip file and enumerate all files stored in it.
| zipfile | name of zip file |
| callback | callback for each file. params:
|
| ud | user data |
| idaman THREAD_SAFE int ida_export process_zip_linput | ( | linput_t * | li, |
| int(idaapi *)( void *ud, qoff64_t offset, int method, uint64 csize, uint64 ucsize, uint32 attributes, const char *filename) | callback, | ||
| void * | ud = NULL |
||
| ) |
Process zip file and enumerate all files stored in it.
| li | input file |
| callback | callback for each file. params:
|
| ud | user data |
| idaman THREAD_SAFE int ida_export process_zipfile_entry | ( | const char * | zipfile, |
| const char * | entry, | ||
| int(idaapi *)( void *ud, qoff64_t offset, int method, uint64 csize, uint64 ucsize, uint32 attributes, const char *filename) | callback, | ||
| void * | ud = NULL, |
||
| bool | case_sensitive = true |
||
| ) |
Search for specified entry in zip file, and calls the callback with it, if found.
| zipfile | name of zip file |
| entry | entry in zip file. E.g., "path/to/entry.dat" |
| callback | callback for each file. params:
|
| ud | user data |
| case_sensitive | should the search be case sensitive? |
| idaman THREAD_SAFE linput_t* ida_export create_zip_linput | ( | linput_t * | in, |
| ssize_t | insize = -1, |
||
| linput_close_code_t | loc = LOC_CLOSE |
||
| ) |
Create a linput to read a compressed input stream.
| in | linput with compressed data, seeked to the stream beginning |
| insize | size of compressed data. -1 - unknown |
| loc | what to do upon closing the resulting linput |
1.8.9.1