ObjFW  History of src/OFDeflateStream.m of 452bdb4a5f026d53

History of file src/OFDeflateStream.m at check-in 452bdb4a5f026d53

2017-06-10
10:00
Deleted: Rename OFDeflateStream back to OFInflateStream

There is not much point in having a bi-directional stream for Deflate
compression / decompression. check-in: [f56a50ee50] user: js, branch: trunk, size: 0

2017-06-05
15:51
OFStream: Don't throw when at end of stream

Instead, let reads return 0 and let writes append after the end. file: [f38e0e21e0] check-in: [f9cd4f9cab] user: js, branch: trunk, size: 20257 [annotate] [blame] [check-ins using] [diff]

2017-05-21
21:28
Prefix private methods with of_ instead of OF_

This matches Apple's style. file: [95db2a693c] check-in: [6b77a5dd8b] user: js, branch: trunk, size: 20161 [annotate] [blame] [check-ins using] [diff]

2017-05-07
20:10
Small code style change

Casts are now written like types in variable declarations. file: [be9beadf26] check-in: [4af49a13c3] user: js, branch: trunk, size: 20161 [annotate] [blame] [check-ins using] [diff]

2017-01-09
17:36
Update copyright

Forgot to add 2017, even though I already did quite some changes in
2017. file: [459199aede] check-in: [44f45c2e35] user: js, branch: trunk, size: 20156 [annotate] [blame] [check-ins using] [diff]

2016-05-29
19:43
OFDeflateStream: Fix -[isAtEndOfStream]

Returning true if _decompression is NULL is a bad idea, as it means
-[isAtEndOfStream] will return true when no read has happened yet. This
breaks the common case where -[isAtEndOfStream] is checked in the loop
condition and the read only happens in the loop body. file: [c4f1ea9fcd] check-in: [8e4451aee2] user: js, branch: trunk, size: 20150 [annotate] [blame] [check-ins using] [diff]

14:41
OFDeflate64Stream: Fix window size file: [6767b2487a] check-in: [24338bc6c9] user: js, branch: trunk, size: 20149 [annotate] [blame] [check-ins using] [diff]
14:15
OFDeflateStream: Separate ivars by (de)compression file: [14779b4fa3] check-in: [e9e89aa4c0] user: js, branch: trunk, size: 20074 [annotate] [blame] [check-ins using] [diff]
13:02
Added: Rename OFInflateStream back to OFDeflateStream

The reason for renaming to OFInflateStream was to have one stream for
decompression and one for compression in order to reduce memory usage if
only one of the two is needed, as the ivar layout will be smaller then.
However, it is more consistent with other stream classes to have one
stream that can handle both. The increased memory footprint of having
ivars for compression and decompression can be solved by having a
pointer to those instead. This will not incur any performance penalty,
as the pointer will be dereferenced instead of the ivars, meaning the
overhead is only getting the pointer from the ivars once. file: [7f4785aa79] check-in: [134a1121c7] user: js, branch: trunk, size: 19216 [annotate] [blame] [check-ins using]

2015-05-16
20:29
Deleted: Rename OFDeflateStream -> OFInflateStream

It makes more sense to have one class for inflating and one for
deflating instead of having one that does both, as having one that does
both requires more memory per instance when only inflating or deflating
is used. check-in: [2e9336b1ef] user: js, branch: trunk, size: 0

2015-01-03
20:57
Update copyright file: [cb454a7b47] check-in: [cfd374b906] user: js, branch: trunk, size: 18858 [annotate] [blame] [check-ins using] [diff]
2014-06-21
21:43
Move all macros from OFObject.h to macros.h

This means that OFObject.h imports macros.h now, making it unnecessary
to manually import macros.h in almost every file. And while at it, also
import autorelease.h in OFObject.h, so that this doesn't need to be
manually imported in almost every file as well. file: [505e08ef0e] check-in: [13ee56edf3] user: js, branch: trunk, size: 18852 [annotate] [blame] [check-ins using] [diff]

2014-05-31
17:57
OFStream: Add -[hasDataInReadBuffer].

This replaces -[numberOfBytesInReadBuffer], as it's not always known how
many bytes there are exactly and thus the number would often be wrong
(e.g. because data is compressed). file: [e0f523d409] check-in: [acc999a75e] user: js, branch: trunk, size: 18896 [annotate] [blame] [check-ins using] [diff]

02:16
Better code sharing between Deflate and Deflate64 file: [8d93d6070f] check-in: [a8c62e1c0d] user: js, branch: trunk, size: 18710 [annotate] [blame] [check-ins using] [diff]
2014-05-05
02:43
Add OF_NO_RETURN and OF_UNREACHABLE file: [cefc6bbea9] check-in: [b885b6fdfa] user: js, branch: trunk, size: 18036 [annotate] [blame] [check-ins using] [diff]
2014-02-18
00:22
Move around a few defines to be more consistent file: [a82b6b33ea] check-in: [f9d12201f8] user: js, branch: trunk, size: 18085 [annotate] [blame] [check-ins using] [diff]
2014-01-25
17:39
Generalize stream / socket related exceptions

This is in preparation for adding UDP sockets, as UDP sockets and TCP
sockets have no common superclass, as one is stream-oriented while the
other is packet-oriented.

Read and write exceptions are for any object now, as they are useful for
a lot more than just for streams, while the others (bind, listen, etc.)
are for any socket now (the type is id in this case, though, as there is
no common superclass). file: [f380a0e937] check-in: [8d2a5052fd] user: js, branch: trunk, size: 18085 [annotate] [blame] [check-ins using] [diff]

2014-01-04
00:24
Update copyright. file: [57e457dcdc] check-in: [3b97fc3cd9] user: js, branch: trunk, size: 18085 [annotate] [blame] [check-ins using] [diff]
2013-11-30
19:53
OFThread.m: Move #ifdefs.

The reason is that the symbol nanosleep is available now on Win32, but
is part of the pthreads wrapper, which we don't use. file: [35c21266ac] check-in: [bd2389b6b8] user: js, branch: trunk, size: 18079 [annotate] [blame] [check-ins using] [diff]

2013-11-23
01:12
Add OF_INVALID_INIT_METHOD. file: [926d013687] check-in: [35dafd5c57] user: js, branch: trunk, size: 18082 [annotate] [blame] [check-ins using] [diff]
2013-11-06
22:35
Make a few implicit casts explicit. file: [20af4c93d0] check-in: [62d1b84b30] user: js, branch: trunk, size: 18170 [annotate] [blame] [check-ins using] [diff]
20:29
Add OFDeflate64Stream. file: [4e0c067ee9] check-in: [7aef43d648] user: js, branch: trunk, size: 18123 [annotate] [blame] [check-ins using] [diff]
2013-10-29
23:46
Clean up OF_ENSURE() vs. assert() a little. file: [b46dd90f88] check-in: [a427cfc86a] user: js, branch: trunk, size: 17543 [annotate] [blame] [check-ins using] [diff]
23:37
OFDeflateStream: Get rid of stupid GCC warnings. file: [66b4a19144] check-in: [2b11bca0d1] user: js, branch: trunk, size: 17490 [annotate] [blame] [check-ins using] [diff]
22:56
OFDeflateStream: Fix reading uncompressed header.

In case the uncompressed header was incomplete, this overwrote the old
buffer instead of continuing it. file: [b45e69217a] check-in: [d1293b647a] user: js, branch: trunk, size: 17473 [annotate] [blame] [check-ins using] [diff]

22:15
OFDeflateStream: Fix tree construction.

When a bit length had more than 255 occurrences, it caused an integer
overflow and thus a corrupt tree.

This also cleans up tree walking. file: [a8810ba694] check-in: [aee3bc12f7] user: js, branch: trunk, size: 17452 [annotate] [blame] [check-ins using] [diff]

10:09
OFDeflateStream: Minor improvements. file: [b262daf9b1] check-in: [f91dbd8975] user: js, branch: trunk, size: 17535 [annotate] [blame] [check-ins using] [diff]
2013-10-10
21:33
OFDeflateStream: Fix uint_fast16_t != uint16_t.

On systems where uint_fast16_t is different from uint16_t, the pointer
operator creates incompatible pointers for those two, thus leading to a
compile time error. Therefore, one uint_fast16_t needed to be changed to
an uint16_t. file: [d790744286] check-in: [5dbf9298bd] user: js, branch: trunk, size: 17640 [annotate] [blame] [check-ins using] [diff]

13:18
Added: Add OFDeflateStream.

No compression support yet, only decompression.

Decompression speed is acceptable for productive use, but there is still
a lot of room for optimization as this is a very straightforward
implementation without much optimization. file: [856d77bd39] check-in: [d83d3aa719] user: js, branch: trunk, size: 17650 [annotate] [blame] [check-ins using]