ObjFW  Diff

Differences From Artifact [b45e69217a]:

To Artifact [66b4a19144]:


156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
}

static struct huffman_tree*
constructTree(uint8_t lengths[], uint_fast16_t count)
{
	struct huffman_tree *tree;
	uint16_t lengthCount[MAX_BITS + 1] = { 0 };
	uint16_t code, maxCode, nextCode[MAX_BITS + 1];
	uint_fast16_t i;

	for (i = 0; i < count; i++) {
		uint8_t length = lengths[i];

		if OF_UNLIKELY (length > MAX_BITS)
			@throw [OFInvalidFormatException exception];







|







156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
}

static struct huffman_tree*
constructTree(uint8_t lengths[], uint_fast16_t count)
{
	struct huffman_tree *tree;
	uint16_t lengthCount[MAX_BITS + 1] = { 0 };
	uint16_t code, maxCode = 0, nextCode[MAX_BITS + 1];
	uint_fast16_t i;

	for (i = 0; i < count; i++) {
		uint8_t length = lengths[i];

		if OF_UNLIKELY (length > MAX_BITS)
			@throw [OFInvalidFormatException exception];
729
730
731
732
733
734
735


736
737
738
739
740
741
742
			CTX.treeIter = CTX.distTree;
			CTX.state = AWAIT_DISTANCE;
		}

		break;
#undef CTX
	}


}

- (bool)lowlevelIsAtEndOfStream
{
	return _atEndOfStream;
}
@end







>
>







729
730
731
732
733
734
735
736
737
738
739
740
741
742
743
744
			CTX.treeIter = CTX.distTree;
			CTX.state = AWAIT_DISTANCE;
		}

		break;
#undef CTX
	}

	assert(0);
}

- (bool)lowlevelIsAtEndOfStream
{
	return _atEndOfStream;
}
@end