mirror of
https://github.com/Jimmy-Z/TWLbf.git
synced 2025-06-18 10:45:31 -04:00
23 lines
536 B
C
23 lines
536 B
C
|
|
#pragma once
|
|
|
|
#include "common.h"
|
|
|
|
#ifndef HEXDUMP_BUF_SIZE
|
|
#define HEXDUMP_BUF_SIZE 0x100
|
|
#endif
|
|
|
|
int hex2bytes(u8 *out, unsigned byte_len, const char *in, int critical);
|
|
|
|
const char * hexdump(const void *a, unsigned l, int space);
|
|
|
|
void print_hex(const void *b, unsigned len);
|
|
|
|
void read_block_from_file(void *out, const char *file_name, size_t offset, size_t size);
|
|
|
|
void* read_file(const char *file_name, unsigned *psize);
|
|
|
|
void dump_to_file(const char *file_name, const void *buf, size_t len);
|
|
|
|
const char * to_Mebi(size_t size);
|