dec

Library to allow decoding of more complex values

Types

std::mem::AlignTo

Aligns the cursor to the given alignment

  • <alignment>: The alignment to align to

struct AlignTo<auto Alignment> { ... } [[hidden, sealed]];

std::mem::Bytes

A type representing a sequence of bytes without any specific meaning

  • <Size>: The size of the sequence

struct Bytes<auto Size> { ... } [[sealed, format]];

std::mem::Endian

The Endianess of a value

enum Endian : u8 {
    Big,
    Little,
    Native
};

std::mem::MagicSearch

Searches for a sequence of bytes and places the given type at that address

  • <Magic>: The magic sequence to search for

  • <T>: The type to place at the address

struct MagicSearch<auto Magic, T> { ... };

std::mem::Reinterpreter

Reinterprets a value as a different one

  • <From>: The type to reinterpret from

  • <To>: The type to reinterpret to

union Reinterpreter<From, To> { ... };

std::mem::Section

A Handle for a custom Section

using Section = u128;

Functions

hex::dec::demangle

Demangles a mangled name into a human readable name

  • mangled_name: The mangled name

  • return: The demangled name

fn demangle(str mangled_name);

hex::dec::zlib_decompress

Decompresses the bytes of a pattern into a section using the zlib algorithm

  • pattern: The pattern whose bytes should be decompressed

  • section: The section to decompress the data into

  • window_size: The window size passed to zlib

  • return: true if successful, false otherwise

fn zlib_decompress(auto pattern, std::mem::Section section, u64 window_size);

hex::dec::bzip_decompress

Decompresses the bytes of a pattern into a section using the bzip algorithm

  • pattern: The pattern whose bytes should be decompressed

  • section: The section to decompress the data into

  • return: true if successful, false otherwise

fn bzip_decompress(auto pattern, std::mem::Section section);

hex::dec::lzma_decompress

Decompresses the bytes of a pattern into a section using the LZMA algorithm

  • pattern: The pattern whose bytes should be decompressed

  • section: The section to decompress the data into

  • return: true if successful, false otherwise

fn lzma_decompress(auto pattern, std::mem::Section section);

hex::dec::zstd_decompress

Decompresses the bytes of a pattern into a section using the zstd algorithm

  • pattern: The pattern whose bytes should be decompressed

  • section: The section to decompress the data into

  • return: true if successful, false otherwise

fn zstd_decompress(auto pattern, std::mem::Section section);

Last updated