shithub: cstory

ref: 59735a61e69047db3c4e4ae874e1177c2ac35c59
dir: /src/File.h/

View raw version
#pragma once

#include <stdio.h>

long LoadFileToMemory(const char *file_path, unsigned char **file_buffer);

unsigned short File_ReadBE16(FILE *stream);
unsigned long File_ReadBE32(FILE *stream);
unsigned short File_ReadLE16(FILE *stream);
unsigned long File_ReadLE32(FILE *stream);

void File_WriteBE16(unsigned short value, FILE *stream);
void File_WriteBE32(unsigned long value, FILE *stream);
void File_WriteLE16(unsigned short value, FILE *stream);
void File_WriteLE32(unsigned long value, FILE *stream);