ObjFW  Diff

Differences From Artifact [91e7a25cd0]:

To Artifact [4aad919281]:


280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309














310
311
312
313
314
315
316

#ifndef DEFLATE64
+ (instancetype)streamWithStream: (OFStream*)stream
{
	return [[[self alloc] initWithStream: stream] autorelease];
}

- init
{
	OF_INVALID_INIT_METHOD
}

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

	_stream = [stream retain];
	_bitIndex = 8;	/* 0-7 address the bit, 8 means fetch next byte */
	_slidingWindowMask = 0x7FFF;

	return self;
}

- (void)dealloc
{
	[_stream release];

	[super dealloc];
}
#endif















- (size_t)lowlevelReadIntoBuffer: (void*)buffer_
			  length: (size_t)length
{
	uint8_t *buffer = buffer_;
	uint_fast16_t bits, i, tmp;
	uint16_t value;







<
<
<
<
<


|


<
<











>
>
>
>
>
>
>
>
>
>
>
>
>
>







280
281
282
283
284
285
286





287
288
289
290
291


292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323

#ifndef DEFLATE64
+ (instancetype)streamWithStream: (OFStream*)stream
{
	return [[[self alloc] initWithStream: stream] autorelease];
}






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

	_stream = [stream retain];



	return self;
}

- (void)dealloc
{
	[_stream release];

	[super dealloc];
}
#endif

- init
{
	self = [super init];

	_bitIndex = 8;	/* 0-7 address the bit, 8 means fetch next byte */
#ifdef DEFLATE64
	_slidingWindowMask = 0xFFFF;
#else
	_slidingWindowMask = 0x7FFF;
#endif

	return self;
}

- (size_t)lowlevelReadIntoBuffer: (void*)buffer_
			  length: (size_t)length
{
	uint8_t *buffer = buffer_;
	uint_fast16_t bits, i, tmp;
	uint16_t value;