31 #ifndef BYTE_STREAM_IN_FILE_H 32 #define BYTE_STREAM_IN_FILE_H 38 #if defined(_MSC_VER) && (_MSC_VER < 1300) 39 extern "C" __int64 _cdecl _ftelli64(FILE*);
40 extern "C" int _cdecl _fseeki64(FILE*, __int64,
int);
112 int byte = getc(
file);
122 if (fread(bytes, 1, num_bytes,
file) != num_bytes)
130 return (
file != stdin);
136 return _ftelli64(
file);
145 return !(_fseeki64(
file, position, SEEK_SET));
147 return !(fseeko(
file, (off_t)position, SEEK_SET));
154 return !(_fseeki64(
file, -distance, SEEK_END));
156 return !(fseeko(
file, (off_t)-distance, SEEK_END));
void get64bitsLE(U8 *bytes)
void get16bitsBE(U8 *bytes)
void getBytes(U8 *bytes, const U32 num_bytes)
void get64bitsBE(U8 *bytes)
void get32bitsBE(U8 *bytes)
void get32bitsBE(U8 *bytes)
virtual void get32bitsBE(U8 *bytes)=0
void get64bitsBE(U8 *bytes)
void get16bitsLE(U8 *bytes)
BOOL seekEnd(const I64 distance=0)
virtual void get64bitsLE(U8 *bytes)=0
void get32bitsLE(U8 *bytes)
void get32bitsLE(U8 *bytes)
void get16bitsLE(U8 *bytes)
BOOL seek(const I64 position)
virtual void get32bitsLE(U8 *bytes)=0
ByteStreamInFileBE(FILE *file)
virtual void get64bitsBE(U8 *bytes)=0
void get16bitsBE(U8 *bytes)
ByteStreamInFileLE(FILE *file)
void get64bitsLE(U8 *bytes)
virtual void get16bitsLE(U8 *bytes)=0
virtual void get16bitsBE(U8 *bytes)=0
ByteStreamInFile(FILE *file)