forked from osoumen/C700
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathChunkReader.h
More file actions
37 lines (28 loc) · 897 Bytes
/
ChunkReader.h
File metadata and controls
37 lines (28 loc) · 897 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
//
// ChunkReader.h
// C700
//
// Created by osoumen on 2017/01/24.
//
//
#ifndef __C700__ChunkReader__
#define __C700__ChunkReader__
#include "DataBuffer.h"
#include "FileAccess.h"
class ChunkReader : public FileAccess, public DataBuffer {
public:
ChunkReader( int allocMemSize );
ChunkReader( const void *data, int dataSize, bool copy=false );
ChunkReader( const char *path );
virtual ~ChunkReader();
bool addChunk( int type, const void* data, int byte ); //容量不足で全部を書き込めないときはfalse
bool addChunkWithHeader(int type, const unsigned char *data, int byte, unsigned char *header, int headerByte);
bool readChunkHead( int *type, long *byte );
virtual bool Write();
typedef struct {
int type;
int size; //ヘッダを除いたデータサイズ
} MyChunkHead;
private:
};
#endif /* defined(__C700__ChunkReader__) */