-
Notifications
You must be signed in to change notification settings - Fork 933
/
FICImageTableChunk.h
56 lines (41 loc) · 1.33 KB
/
FICImageTableChunk.h
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
//
// FICImageTableChunk.h
// FastImageCache
//
// Copyright (c) 2013 Path, Inc.
// See LICENSE for full license agreement.
//
#import "FICImports.h"
@class FICImageTable;
/**
`FICImageTableChunk` represents a contiguous portion of image table file data.
*/
@interface FICImageTableChunk : NSObject
///-----------------------------------
/// @name Image Table Chunk Properties
///-----------------------------------
/**
The bytes of file data contained in the chunk.
@discussion `FICImageTableChunk` maps file data directly to `bytes`, so no memory copy occurs.
*/
@property (nonatomic, assign, readonly) void *bytes;
/**
The index of the chunk in the image table file.
*/
@property (nonatomic, assign, readonly) NSInteger index;
/**
The offset in the image table file where the chunk begins.
*/
@property (nonatomic, assign, readonly) off_t fileOffset;
///----------------------------------------
/// @name Initializing an Image Table Chunk
///----------------------------------------
/**
Initializes a new image table chunk.
@param fileDescriptor The image table's file descriptor to map from.
@param index The index of the chunk.
@param length The length, in bytes, of the chunk.
@return A new image table chunk.
*/
- (instancetype)initWithFileDescriptor:(int)fileDescriptor index:(NSInteger)index length:(size_t)length;
@end