fchnk_t * fchnk_ctor()
Constructs a new file chunk object.
fchnk_t * get_fchnk(const char *fname)
Reads the contents of a binary file into a dynamically allocated buffer and stores it in a new fchnk_...
fchnk_t * fchnk_ptor(char *const buff, const size_t chksz)
Initializes and returns a file chunk object with provided buffer and size.
bool fwrite_fchnk(const char *fname, const fchnk_t *chnk)
Writes the contents of a file chunk to a specified file.
void fchnk_dtor(fchnk_t *chnk)
Destructor for the file chunk object.
A structure that represents a chunk of data from a file.
Definition lexer_io.h:36
char * buff
A pointer to a buffer that holds the content of the file chunk.
Definition lexer_io.h:44
size_t chksz
The size of the data stored in the buff buffer.
Definition lexer_io.h:54