mirror of
https://github.com/Ed94/raddebugger.git
synced 2026-11-21 21:32:22 -08:00
get rdi_dump off dbgi layer, actually, super bad idea; just dedup decompression code
This commit is contained in:
1 parent
325474fc49
commit
bddc9c97d9
7 files changed
+116
-75
No files matched your search
@@ -221,6 +221,17 @@ rdi_parse(RDI_U8 *data, RDI_U64 size, RDI_Parsed *out)
|
||||
return(result);
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U64
|
||||
rdi_decompressed_size_from_parsed(RDI_Parsed *rdi)
|
||||
{
|
||||
RDI_U64 decompressed_size = rdi->raw_data_size;
|
||||
for(RDI_U64 dsec_idx = 0; dsec_idx < rdi->dsec_count; dsec_idx += 1)
|
||||
{
|
||||
decompressed_size += (rdi->dsecs[dsec_idx].unpacked_size - rdi->dsecs[dsec_idx].encoded_size);
|
||||
}
|
||||
return decompressed_size;
|
||||
}
|
||||
|
||||
RDI_PROC RDI_U8*
|
||||
rdi_string_from_idx(RDI_Parsed *parsed, RDI_U32 idx, RDI_U64 *len_out){
|
||||
RDI_U8 *result = 0;
|
||||
|
||||
@@ -153,6 +153,9 @@ static RDI_Local rdi_local_nil = {0};
|
||||
RDI_PROC RDI_ParseStatus
|
||||
rdi_parse(RDI_U8 *data, RDI_U64 size, RDI_Parsed *out);
|
||||
|
||||
RDI_PROC RDI_U64
|
||||
rdi_decompressed_size_from_parsed(RDI_Parsed *rdi);
|
||||
|
||||
RDI_PROC RDI_U8*
|
||||
rdi_string_from_idx(RDI_Parsed *parsed, RDI_U32 idx, RDI_U64 *len_out);
|
||||
|
||||
|
||||
Reference in new issue
Block a user