ObjFW  Diff

Differences From Artifact [2f25e4e657]:

To Artifact [e6df60b73e]:


242
243
244
245
246
247
248

249
250
251
252
253
254
255
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256







+







start:
	switch ((enum state)_state) {
	case BLOCK_HEADER:
		if OF_UNLIKELY (_inLastBlock) {
			[_stream unreadFromBuffer: _buffer + _bufferIndex
					   length: _bufferLength -
						   _bufferIndex];
			_bufferIndex = _bufferLength = 0;

			_atEndOfStream = true;
			return bytesWritten;
		}

		if OF_UNLIKELY (!tryReadBits(self, &bits, 3))
			return bytesWritten;
673
674
675
676
677
678
679





680
681
682
683
684
685
674
675
676
677
678
679
680
681
682
683
684
685
686
687
688
689
690
691







+
+
+
+
+






{
	return ([super hasDataInReadBuffer] || [_stream hasDataInReadBuffer]);
}
#endif

- (void)close
{
	/* Give back our buffer to the stream, in case it's shared */
	[_stream unreadFromBuffer: _buffer + _bufferIndex
			   length: _bufferLength - _bufferIndex];
	_bufferIndex = _bufferLength = 0;

	[_stream release];
	_stream = nil;

	[super close];
}
@end