-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathMEUnarchiver.h
More file actions
26 lines (21 loc) · 1.25 KB
/
MEUnarchiver.h
File metadata and controls
26 lines (21 loc) · 1.25 KB
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
//
// MEUnarchiver.h
//
// Created by Frank Illenberger on 13.03.15.
//
// Replacement for the NSUnarchiver which is only available as private API under iOS.
// We need it for importing documents of Merlin 2 which used NSArchiver for serializing values
// for durations, utilizations, budgets etc. For maximum compatibility, we should still prefer to
// to use the original NSArchiver under OS X.
// The implementation is loosely based on file format documented by the code found in typedstream.m inside objc-1.tar.gz of an old Darwin release
// http://ia700409.us.archive.org/zipview.php?zip=/12/items/ftp_nextstuff_info/nextstuff.info.2012.11.zip
// http://archive.org/download/ftp_nextstuff_info/nextstuff.info.2012.11.zip/nextstuff.info%2Fmirrors%2Fotto%2Fhtml%2Fpub%2FDarwin%2FPublicSource%2FDarwin%2Fobjc-1.tar.gz
@interface MEUnarchiver : NSCoder
- (id)initForReadingWithData:(NSData*)data;
@property (nonatomic, readonly, copy) NSData* data;
@property (nonatomic, readonly) BOOL isAtEnd;
// Uses NSArchiver under OS X and MEArchiver under iOS.
+ (id) compatibilityUnarchiveObjectWithData:(NSData*)data
decodeClassName:(NSString*)archiveClassName
asClassName:(NSString*)className;
@end