Skip to content

Commit 9c51031

Browse files
committed
Rewrote comment at the beginning of script
1 parent a39fd96 commit 9c51031

File tree

1 file changed

+17
-11
lines changed

1 file changed

+17
-11
lines changed

pwexplode.py

+17-11
Original file line numberDiff line numberDiff line change
@@ -17,23 +17,29 @@
1717
# You should have received a copy of the GNU General Public License
1818
# along with this program. If not, see <http://www.gnu.org/licenses/>.
1919

20-
# Note: this program is mostly based on the description of Ben Rudiak-Gould in the comp.compression group:
20+
# Note: this program is mostly based on the description of Ben Rudiak-
21+
# Gould in the comp.compression group:
2122
# https://groups.google.com/forum/#!msg/comp.compression/M5P064or93o/W1ca1-ad6kgJ
2223
# and zlib's blast.c:
2324
# https://github.com/madler/zlib/blob/master/contrib/blast/blast.c#L150
2425

25-
# It should be noted that there is a small mistake in Ben's example. He writes 00 04 82 24 25 c7 80 7f should
26-
# decompress to 'AIAIAIAIAIAIA'; However, testing this with my implementation failed. I realized that there is
27-
# a small mistake in the sequence itself, when I created it with the official pkware ziptool (see below for tests)
28-
# and the sequence turned out to be actually 00 04 82 24 25 8f 80 7f (notice the difference at byte 6). This will
26+
# It should be noted that there is a small mistake in Ben's example.
27+
# He uses 00 04 82 24 25 c7 80 7f as example, which should decompress
28+
# to 'AIAIAIAIAIAIA'. However, testing this with my implementation
29+
# failed. When I created it with the official pkware ziptool (see
30+
# below for tests), the sequence turned out to be actually
31+
# 00 04 82 24 25 8f 80 7f (notice the difference at byte 6). This will
2932
# successfully decompress to 'AIAIAIAIAIAIA'.
3033

31-
# Instead of pure dictionaries, this package uses functions to provide the data of the tables necessary to decompress
32-
# streams. Advantage: functions are 'read-only' and can provide error feedback. Disadvantage: overhead, runtime. But
33-
# it is considered to be minimal. In order to reduce the extra time a little bit, all tables are 'complete', i.e. each
34-
# entry just needs to be extracted and does not need to be calculated. The difference is minimal and practical non-
35-
# existant when accessing a function one time only; but these functions can be called hundred or thousand times per
36-
# stream.
34+
# Instead of pure dictionaries, this package uses functions to provide
35+
# the data of the tables necessary to decompress streams. Advantage:
36+
# functions are 'read-only' and can provide error feedback.
37+
# Disadvantage: overhead, runtime. But it is considered to be minimal.
38+
# In order to reduce the extra time a little bit, all tables are
39+
# 'complete', i.e. each entry just needs to be extracted but not
40+
# calculated. The difference is minimal and practical non-existant
41+
# when accessing a function one time only; but these functions can be
42+
# called hundred or thousand times per stream.
3743

3844
# Import stuff
3945
import struct

0 commit comments

Comments
 (0)