ObjFW  Diff

Differences From Artifact [bc8629617c]:

To Artifact [d0b4b1bf2e]:


43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@implementation GZIPArchive
+ (void)initialize
{
	if (self == [GZIPArchive class])
		app = [[OFApplication sharedApplication] delegate];
}

+ (instancetype)archiveWithFile: (OFFile*)file
{
	return [[[self alloc] initWithFile: file] autorelease];
}

- initWithFile: (OFFile*)file
{
	self = [super init];

	@try {
		_stream = [[OFGZIPStream alloc] initWithStream: file];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}







|

|


|




|







43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
@implementation GZIPArchive
+ (void)initialize
{
	if (self == [GZIPArchive class])
		app = [[OFApplication sharedApplication] delegate];
}

+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream*))stream
{
	return [[[self alloc] initWithStream: stream] autorelease];
}

- initWithStream: (OF_KINDOF(OFStream*))stream
{
	self = [super init];

	@try {
		_stream = [[OFGZIPStream alloc] initWithStream: stream];
	} @catch (id e) {
		[self release];
		@throw e;
	}

	return self;
}