ObjFW  Diff

Differences From Artifact [1c958d34d5]:

To Artifact [e4f1e2e6e9]:


22
23
24
25
26
27
28
29

30
31
32
33
34

35
36
37
38
39
40
41
22
23
24
25
26
27
28

29
30
31
32
33

34
35
36
37
38
39
40
41







-
+




-
+








#import "crc32.h"

#import "OFChecksumFailedException.h"
#import "OFInvalidFormatException.h"

@implementation OFGZIPStream
+ (instancetype)streamWithStream: (OFStream*)stream
+ (instancetype)streamWithStream: (OFStream *)stream
{
	return [[[self alloc] initWithStream: stream] autorelease];
}

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

	@try {
		_stream = [stream retain];
		_CRC32 = ~0;
	} @catch (id e) {
51
52
53
54
55
56
57
58

59
60
61
62
63
64
65
51
52
53
54
55
56
57

58
59
60
61
62
63
64
65







-
+







	[_stream release];
	[_inflateStream release];
	[_modificationDate release];

	[super dealloc];
}

- (size_t)lowlevelReadIntoBuffer: (void*)buffer
- (size_t)lowlevelReadIntoBuffer: (void *)buffer
			  length: (size_t)length
{
	uint8_t byte;

	for (;;) {
		switch (_state) {
		case OF_GZIP_STREAM_ID1: