ObjFW  Diff

Differences From Artifact [75b73d1fa8]:

  • File utils/ofzip/GZIPArchive.m — part of check-in [7e5c81e186] at 2018-01-03 19:49:46 on branch trunk — Update copyright notice (user: js size: 3879)

To Artifact [e95550219d]:

  • File utils/ofzip/GZIPArchive.m — part of check-in [14b9a27b65] at 2018-05-26 08:47:51 on branch trunk — ofzip: Add support for specifying the encoding (user: js size: 4000)

49
50
51
52
53
54
55

56
57
58

59
60
61
62

63
64
65
66
67
68
69
{
	if (self == [GZIPArchive class])
		app = (OFZIP *)[[OFApplication sharedApplication] delegate];
}

+ (instancetype)archiveWithStream: (OF_KINDOF(OFStream *))stream
			     mode: (OFString *)mode

{
	return [[[self alloc] initWithStream: stream
					mode: mode] autorelease];

}

- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
			  mode: (OFString *)mode

{
	self = [super init];

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







>


|
>




>







49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
{
	if (self == [GZIPArchive class])
		app = (OFZIP *)[[OFApplication sharedApplication] delegate];
}

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

- (instancetype)initWithStream: (OF_KINDOF(OFStream *))stream
			  mode: (OFString *)mode
		      encoding: (of_string_encoding_t)encoding
{
	self = [super init];

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