Files
Work/sample/DataChnk.cpp
2024-08-07 09:16:27 -04:00

16 lines
386 B
C++

#include <sample/datachnk.hpp>
bool DataChunk::read(FileHandle &handle)
{
if(!mChunkID.read(handle))return false;
if(!handle.read((BYTE*)&mLengthData,sizeof(mLengthData)))return false;
return true;
}
bool DataChunk::write(MemFile &memFile)const
{
if(!mChunkID.write(memFile))return false;
if(!memFile.write((char*)&mLengthData,sizeof(mLengthData)))return false;
return true;
}