#import <Foundation/Foundation.h>

#define FilePath @"fixedlengthdata.txt"
const unsigned int RecordSize = 12 + 12 + 1 + 3 + 4 + 2 + 31 * 1502;
const unsigned int RecordCount = 500;

int main (int argc, const char * argv[]) {
    NSAutoreleasePool * pool = [[NSAutoreleasePool alloc] init];
	
	NSData* data = [NSData dataWithContentsOfMappedFile:FilePath];
	if ( data ) {
		NSMutableArray* array = [NSMutableArray array];
		for ( int i = 0; i < RecordCount; i++ )
			[array addObject:[data subdataWithRange:NSMakeRange( i * RecordSize, RecordSize )]];
	}
	
    [pool drain];
    return 0;
}
