rubyzip 1.3.0 → 3.0.0.alpha

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (134) hide show
  1. checksums.yaml +4 -4
  2. data/Changelog.md +368 -0
  3. data/README.md +123 -46
  4. data/Rakefile +13 -6
  5. data/lib/zip/central_directory.rb +166 -116
  6. data/lib/zip/compressor.rb +3 -1
  7. data/lib/zip/constants.rb +77 -21
  8. data/lib/zip/crypto/decrypted_io.rb +42 -0
  9. data/lib/zip/crypto/encryption.rb +4 -2
  10. data/lib/zip/crypto/null_encryption.rb +5 -3
  11. data/lib/zip/crypto/traditional_encryption.rb +14 -12
  12. data/lib/zip/decompressor.rb +21 -2
  13. data/lib/zip/deflater.rb +10 -8
  14. data/lib/zip/dirtyable.rb +32 -0
  15. data/lib/zip/dos_time.rb +53 -12
  16. data/lib/zip/entry.rb +306 -184
  17. data/lib/zip/entry_set.rb +11 -7
  18. data/lib/zip/errors.rb +115 -15
  19. data/lib/zip/extra_field/generic.rb +11 -17
  20. data/lib/zip/extra_field/ntfs.rb +8 -2
  21. data/lib/zip/extra_field/old_unix.rb +6 -2
  22. data/lib/zip/extra_field/universal_time.rb +45 -13
  23. data/lib/zip/extra_field/unix.rb +7 -3
  24. data/lib/zip/extra_field/unknown.rb +33 -0
  25. data/lib/zip/extra_field/zip64.rb +16 -7
  26. data/lib/zip/extra_field.rb +22 -26
  27. data/lib/zip/file.rb +196 -240
  28. data/lib/zip/file_split.rb +97 -0
  29. data/lib/zip/filesystem/dir.rb +86 -0
  30. data/lib/zip/filesystem/directory_iterator.rb +48 -0
  31. data/lib/zip/filesystem/file.rb +262 -0
  32. data/lib/zip/filesystem/file_stat.rb +110 -0
  33. data/lib/zip/filesystem/zip_file_name_mapper.rb +81 -0
  34. data/lib/zip/filesystem.rb +31 -584
  35. data/lib/zip/inflater.rb +27 -37
  36. data/lib/zip/input_stream.rb +67 -42
  37. data/lib/zip/ioextras/abstract_input_stream.rb +32 -16
  38. data/lib/zip/ioextras/abstract_output_stream.rb +5 -3
  39. data/lib/zip/ioextras.rb +7 -7
  40. data/lib/zip/null_compressor.rb +3 -1
  41. data/lib/zip/null_decompressor.rb +4 -10
  42. data/lib/zip/null_input_stream.rb +3 -1
  43. data/lib/zip/output_stream.rb +58 -43
  44. data/lib/zip/pass_thru_compressor.rb +5 -3
  45. data/lib/zip/pass_thru_decompressor.rb +16 -23
  46. data/lib/zip/streamable_directory.rb +6 -4
  47. data/lib/zip/streamable_stream.rb +9 -10
  48. data/lib/zip/version.rb +3 -1
  49. data/lib/zip.rb +19 -4
  50. data/rubyzip.gemspec +38 -0
  51. data/samples/example.rb +9 -4
  52. data/samples/example_filesystem.rb +3 -2
  53. data/samples/example_recursive.rb +3 -1
  54. data/samples/gtk_ruby_zip.rb +22 -20
  55. data/samples/qtzip.rb +12 -11
  56. data/samples/write_simple.rb +3 -4
  57. data/samples/zipfind.rb +24 -22
  58. metadata +86 -179
  59. data/TODO +0 -15
  60. data/lib/zip/extra_field/zip64_placeholder.rb +0 -15
  61. data/test/basic_zip_file_test.rb +0 -60
  62. data/test/case_sensitivity_test.rb +0 -69
  63. data/test/central_directory_entry_test.rb +0 -69
  64. data/test/central_directory_test.rb +0 -100
  65. data/test/crypto/null_encryption_test.rb +0 -57
  66. data/test/crypto/traditional_encryption_test.rb +0 -80
  67. data/test/data/WarnInvalidDate.zip +0 -0
  68. data/test/data/file1.txt +0 -46
  69. data/test/data/file1.txt.deflatedData +0 -0
  70. data/test/data/file2.txt +0 -1504
  71. data/test/data/globTest/foo/bar/baz/foo.txt +0 -0
  72. data/test/data/globTest/foo.txt +0 -0
  73. data/test/data/globTest/food.txt +0 -0
  74. data/test/data/globTest.zip +0 -0
  75. data/test/data/gpbit3stored.zip +0 -0
  76. data/test/data/mimetype +0 -1
  77. data/test/data/notzippedruby.rb +0 -7
  78. data/test/data/ntfs.zip +0 -0
  79. data/test/data/oddExtraField.zip +0 -0
  80. data/test/data/path_traversal/Makefile +0 -10
  81. data/test/data/path_traversal/jwilk/README.md +0 -5
  82. data/test/data/path_traversal/jwilk/absolute1.zip +0 -0
  83. data/test/data/path_traversal/jwilk/absolute2.zip +0 -0
  84. data/test/data/path_traversal/jwilk/dirsymlink.zip +0 -0
  85. data/test/data/path_traversal/jwilk/dirsymlink2a.zip +0 -0
  86. data/test/data/path_traversal/jwilk/dirsymlink2b.zip +0 -0
  87. data/test/data/path_traversal/jwilk/relative0.zip +0 -0
  88. data/test/data/path_traversal/jwilk/relative2.zip +0 -0
  89. data/test/data/path_traversal/jwilk/symlink.zip +0 -0
  90. data/test/data/path_traversal/relative1.zip +0 -0
  91. data/test/data/path_traversal/tilde.zip +0 -0
  92. data/test/data/path_traversal/tuzovakaoff/README.md +0 -3
  93. data/test/data/path_traversal/tuzovakaoff/absolutepath.zip +0 -0
  94. data/test/data/path_traversal/tuzovakaoff/symlink.zip +0 -0
  95. data/test/data/rubycode.zip +0 -0
  96. data/test/data/rubycode2.zip +0 -0
  97. data/test/data/test.xls +0 -0
  98. data/test/data/testDirectory.bin +0 -0
  99. data/test/data/zip64-sample.zip +0 -0
  100. data/test/data/zipWithDirs.zip +0 -0
  101. data/test/data/zipWithEncryption.zip +0 -0
  102. data/test/deflater_test.rb +0 -65
  103. data/test/encryption_test.rb +0 -42
  104. data/test/entry_set_test.rb +0 -163
  105. data/test/entry_test.rb +0 -154
  106. data/test/errors_test.rb +0 -35
  107. data/test/extra_field_test.rb +0 -76
  108. data/test/file_extract_directory_test.rb +0 -54
  109. data/test/file_extract_test.rb +0 -145
  110. data/test/file_permissions_test.rb +0 -65
  111. data/test/file_split_test.rb +0 -57
  112. data/test/file_test.rb +0 -666
  113. data/test/filesystem/dir_iterator_test.rb +0 -58
  114. data/test/filesystem/directory_test.rb +0 -139
  115. data/test/filesystem/file_mutating_test.rb +0 -87
  116. data/test/filesystem/file_nonmutating_test.rb +0 -508
  117. data/test/filesystem/file_stat_test.rb +0 -64
  118. data/test/gentestfiles.rb +0 -126
  119. data/test/inflater_test.rb +0 -14
  120. data/test/input_stream_test.rb +0 -182
  121. data/test/ioextras/abstract_input_stream_test.rb +0 -102
  122. data/test/ioextras/abstract_output_stream_test.rb +0 -106
  123. data/test/ioextras/fake_io_test.rb +0 -18
  124. data/test/local_entry_test.rb +0 -154
  125. data/test/output_stream_test.rb +0 -128
  126. data/test/pass_thru_compressor_test.rb +0 -30
  127. data/test/pass_thru_decompressor_test.rb +0 -14
  128. data/test/path_traversal_test.rb +0 -141
  129. data/test/samples/example_recursive_test.rb +0 -37
  130. data/test/settings_test.rb +0 -95
  131. data/test/test_helper.rb +0 -234
  132. data/test/unicode_file_names_and_comments_test.rb +0 -62
  133. data/test/zip64_full_test.rb +0 -51
  134. data/test/zip64_support_test.rb +0 -14
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 7861f60d52fbe54891831d9239df3e3e927a33f1f2d00abcb7b2693a8c01097d
4
- data.tar.gz: c04844369dbc75f40583f3d8aab34cbf2cfcce293b3c30570fa76208755a3157
3
+ metadata.gz: dd95bfed4ea9c320051f039341277893bedc591147c093a4c527082b81eb6ae3
4
+ data.tar.gz: ea955185220e2d566bb8c843bd76dd2b076ca1b4353f3d1c1c5910522a2e3d7c
5
5
  SHA512:
6
- metadata.gz: f9fa8a9f92c4789f06a1691eee6201918a753f1356eb6f2ef99fe9c777d46d661b7a8f96ce71b7a18406a4e1a4098f81b8a282babe2a7284ae0c8c04d03cf758
7
- data.tar.gz: e4650b6f572ef4bcdb33cff4bd0c7ddbd399b04278bd644d11ea29defe057510706d15d0b8ac918df28280d13f4bdfec28526aaad258ff52136ce209f29a35dd
6
+ metadata.gz: 74dc66a56c1b5e899ba2d683dd4f147be5f301f1d51d86d5d9f027c4c9a74beb48135aaec72e304dd9b8ff92d4f0f2f429d4ab0e0eb5b19c9322bdcf5b66ddea
7
+ data.tar.gz: 0ad96c3aa4ab42648abdfa8e60d7360a17bc0543d6116a70bd4679f7a9b5da57c1f1d3580bb5e1d7b9d9c8a87b76e084a8f759c4bfacf99e6dca8580d85bf2a7
data/Changelog.md ADDED
@@ -0,0 +1,368 @@
1
+ # 3.0.0 (Next)
2
+
3
+ - Don't silently alter zip files opened with `Zip::sort_entries`. [#329](https://github.com/rubyzip/rubyzip/issues/329)
4
+ - Use named parameters for optional arguments in the public API.
5
+ - Raise an error if entry names exceed 65,535 characters. [#247](https://github.com/rubyzip/rubyzip/issues/247)
6
+ - Remove the `ZipXError` v1 legacy classes.
7
+ - Raise an error on reading a split archive with `InputStream`. [#349](https://github.com/rubyzip/rubyzip/issues/349)
8
+ - Ensure `InputStream` raises `GPFBit3Error` for OSX Archive files. [#493](https://github.com/rubyzip/rubyzip/issues/493)
9
+ - Improve documentation and error messages for `InputStream`. [#196](https://github.com/rubyzip/rubyzip/issues/196)
10
+ - Fix zip file-level comment is not read from zip64 files. [#492](https://github.com/rubyzip/rubyzip/issues/492)
11
+ - Fix `Zip::OutputStream.write_buffer` doesn't work with Tempfiles. [#265](https://github.com/rubyzip/rubyzip/issues/265)
12
+ - Reinstate normalising pathname separators to /. [#487](https://github.com/rubyzip/rubyzip/pull/487)
13
+ - Fix restore options consistency. [#486](https://github.com/rubyzip/rubyzip/pull/486)
14
+ - View and/or preserve original date created, date modified? (Windows). [#336](https://github.com/rubyzip/rubyzip/issues/336)
15
+ - Fix frozen string literal error. [#475](https://github.com/rubyzip/rubyzip/pull/475)
16
+ - Set the default `Entry` time to the file's mtime on Windows. [#465](https://github.com/rubyzip/rubyzip/issues/465)
17
+ - Ensure that `Entry#time=` sets times as `DOSTime` objects. [#481](https://github.com/rubyzip/rubyzip/issues/481)
18
+ - Replace and deprecate `Zip::DOSTime#dos_equals`. [#464](https://github.com/rubyzip/rubyzip/pull/464)
19
+ - Fix loading extra fields. [#459](https://github.com/rubyzip/rubyzip/pull/459)
20
+ - Set compression level on a per-zipfile basis. [#448](https://github.com/rubyzip/rubyzip/pull/448)
21
+ - Fix input stream partial read error. [#462](https://github.com/rubyzip/rubyzip/pull/462)
22
+ - Fix zlib deflate buffer growth. [#447](https://github.com/rubyzip/rubyzip/pull/447)
23
+
24
+ Tooling/internal:
25
+
26
+ - Configure Coveralls to not report a failure on minor decreases of test coverage. [#491](https://github.com/rubyzip/rubyzip/issues/491)
27
+ - Extract the file splitting code out into its own module.
28
+ - Refactor, and tidy up, the `Zip::Filesystem` classes for improved maintainability.
29
+ - Fix Windows tests. [#489](https://github.com/rubyzip/rubyzip/pull/489)
30
+ - Refactor `assert_forwarded` so it does not need `ObjectSpace._id2ref` or `eval`. [#483](https://github.com/rubyzip/rubyzip/pull/483)
31
+ - Add GitHub Actions CI infrastructure. [#469](https://github.com/rubyzip/rubyzip/issues/469)
32
+ - Add Ruby 3.0 to CI. [#474](https://github.com/rubyzip/rubyzip/pull/474)
33
+ - Fix the compression level tests to compare relative sizes. [#473](https://github.com/rubyzip/rubyzip/pull/473)
34
+ - Simplify assertions in basic_zip_file_test. [#470](https://github.com/rubyzip/rubyzip/pull/470)
35
+ - Remove compare_enumerables from test_helper.rb. [#468](https://github.com/rubyzip/rubyzip/pull/468)
36
+ - Use correct SPDX license identifier. [#458](https://github.com/rubyzip/rubyzip/pull/458)
37
+ - Enable truffle ruby in Travis CI. [#450](https://github.com/rubyzip/rubyzip/pull/450)
38
+ - Update rubocop again and run it in CI. [#444](https://github.com/rubyzip/rubyzip/pull/444)
39
+ - Fix a test that was incorrect on big-endian architectures. [#445](https://github.com/rubyzip/rubyzip/pull/445)
40
+
41
+ # 2.3.2 (2021-07-05)
42
+
43
+ - A "dummy" release to warn about breaking changes coming in version 3.0. This updated version uses the Gem `post_install_message` instead of printing to `STDERR`.
44
+
45
+ # 2.3.1 (2021-07-03)
46
+
47
+ - A "dummy" release to warn about breaking changes coming in version 3.0.
48
+
49
+ # 2.3.0 (2020-03-14)
50
+
51
+ - Fix frozen string literal error [#431](https://github.com/rubyzip/rubyzip/pull/431)
52
+ - Set `OutputStream.write_buffer`'s buffer to binmode [#439](https://github.com/rubyzip/rubyzip/pull/439)
53
+ - Upgrade rubocop and fix various linting complaints [#437](https://github.com/rubyzip/rubyzip/pull/437) [#440](https://github.com/rubyzip/rubyzip/pull/440)
54
+
55
+ Tooling:
56
+
57
+ - Add a `bin/console` script for development [#420](https://github.com/rubyzip/rubyzip/pull/420)
58
+ - Update rake requirement (development dependency only) to fix a security alert.
59
+
60
+ # 2.2.0 (2020-02-01)
61
+
62
+ - Add support for decompression plugin gems [#427](https://github.com/rubyzip/rubyzip/pull/427)
63
+
64
+ # 2.1.0 (2020-01-25)
65
+
66
+ - Fix (at least partially) the `restore_times` and `restore_permissions` options to `Zip::File.new` [#413](https://github.com/rubyzip/rubyzip/pull/413)
67
+ - Previously, neither option did anything, regardless of what it was set to. We have therefore defaulted them to `false` to preserve the current behavior, for the time being. If you have explicitly set either to `true`, it will now have an effect.
68
+ - Fix handling of UniversalTime (`mtime`, `atime`, `ctime`) fields. [#421](https://github.com/rubyzip/rubyzip/pull/421)
69
+ - Previously, `Zip::File` did not pass the options to `Zip::Entry` in some cases. [#423](https://github.com/rubyzip/rubyzip/pull/423)
70
+ - Note that `restore_times` in this release does nothing on Windows and only restores `mtime`, not `atime` or `ctime`.
71
+ - Allow `Zip::File.open` to take an options hash like `Zip::File.new` [#418](https://github.com/rubyzip/rubyzip/pull/418)
72
+ - Always print warnings with `warn`, instead of a mix of `puts` and `warn` [#416](https://github.com/rubyzip/rubyzip/pull/416)
73
+ - Create temporary files in the system temporary directory instead of the directory of the zip file [#411](https://github.com/rubyzip/rubyzip/pull/411)
74
+ - Drop unused `tmpdir` requirement [#411](https://github.com/rubyzip/rubyzip/pull/411)
75
+
76
+ Tooling
77
+
78
+ - Move CI to xenial and include jruby on JDK11 [#419](https://github.com/rubyzip/rubyzip/pull/419/files)
79
+
80
+ # 2.0.0 (2019-09-25)
81
+
82
+ Security
83
+
84
+ - Default the `validate_entry_sizes` option to `true`, so that callers can trust an entry's reported size when using `extract` [#403](https://github.com/rubyzip/rubyzip/pull/403)
85
+ - This option defaulted to `false` in 1.3.0 for backward compatibility, but it now defaults to `true`. If you are using an older version of ruby and can't yet upgrade to 2.x, you can still use 1.3.0 and set the option to `true`.
86
+
87
+ Tooling / Documentation
88
+
89
+ - Remove test files from the gem to avoid problems with antivirus detections on the test files [#405](https://github.com/rubyzip/rubyzip/pull/405) / [#384](https://github.com/rubyzip/rubyzip/issues/384)
90
+ - Drop support for unsupported ruby versions [#406](https://github.com/rubyzip/rubyzip/pull/406)
91
+
92
+ # 1.3.0 (2019-09-25)
93
+
94
+ Security
95
+
96
+ - Add `validate_entry_sizes` option so that callers can trust an entry's reported size when using `extract` [#403](https://github.com/rubyzip/rubyzip/pull/403)
97
+ - This option defaults to `false` for backward compatibility in this release, but you are strongly encouraged to set it to `true`. It will default to `true` in rubyzip 2.0.
98
+
99
+ New Feature
100
+
101
+ - Add `add_stored` method to simplify adding entries without compression [#366](https://github.com/rubyzip/rubyzip/pull/366)
102
+
103
+ Tooling / Documentation
104
+
105
+ - Add more gem metadata links [#402](https://github.com/rubyzip/rubyzip/pull/402)
106
+
107
+ # 1.2.4 (2019-09-06)
108
+
109
+ - Do not rewrite zip files opened with `open_buffer` that have not changed [#360](https://github.com/rubyzip/rubyzip/pull/360)
110
+
111
+ Tooling / Documentation
112
+
113
+ - Update `example_recursive.rb` in README [#397](https://github.com/rubyzip/rubyzip/pull/397)
114
+ - Hold CI at `trusty` for now, automatically pick the latest ruby patch version, use rbx-4 and hold jruby at 9.1 [#399](https://github.com/rubyzip/rubyzip/pull/399)
115
+
116
+ # 1.2.3
117
+
118
+ - Allow tilde in zip entry names [#391](https://github.com/rubyzip/rubyzip/pull/391) (fixes regression in 1.2.2 from [#376](https://github.com/rubyzip/rubyzip/pull/376))
119
+ - Support frozen string literals in more files [#390](https://github.com/rubyzip/rubyzip/pull/390)
120
+ - Require `pathname` explicitly [#388](https://github.com/rubyzip/rubyzip/pull/388) (fixes regression in 1.2.2 from [#376](https://github.com/rubyzip/rubyzip/pull/376))
121
+
122
+ Tooling / Documentation:
123
+
124
+ - CI updates [#392](https://github.com/rubyzip/rubyzip/pull/392), [#394](https://github.com/rubyzip/rubyzip/pull/394)
125
+ - Bump supported ruby versions and add 2.6
126
+ - JRuby failures are no longer ignored (reverts [#375](https://github.com/rubyzip/rubyzip/pull/375) / part of [#371](https://github.com/rubyzip/rubyzip/pull/371))
127
+ - Add changelog entry that was missing for last release [#387](https://github.com/rubyzip/rubyzip/pull/387)
128
+ - Comment cleanup [#385](https://github.com/rubyzip/rubyzip/pull/385)
129
+
130
+ # 1.2.2
131
+
132
+ NB: This release drops support for extracting symlinks, because there was no clear way to support this securely. See https://github.com/rubyzip/rubyzip/pull/376#issue-210954555 for details.
133
+
134
+ - Fix CVE-2018-1000544 [#376](https://github.com/rubyzip/rubyzip/pull/376) / [#371](https://github.com/rubyzip/rubyzip/pull/371)
135
+ - Fix NoMethodError: undefined method `glob' [#363](https://github.com/rubyzip/rubyzip/pull/363)
136
+ - Fix handling of stored files (i.e. files not using compression) with general purpose bit 3 set [#358](https://github.com/rubyzip/rubyzip/pull/358)
137
+ - Fix `close` on StringIO-backed zip file [#353](https://github.com/rubyzip/rubyzip/pull/353)
138
+ - Add `Zip.force_entry_names_encoding` option [#340](https://github.com/rubyzip/rubyzip/pull/340)
139
+ - Update rubocop, apply auto-fixes, and fix regressions caused by said auto-fixes [#332](https://github.com/rubyzip/rubyzip/pull/332), [#355](https://github.com/rubyzip/rubyzip/pull/355)
140
+ - Save temporary files to temporary directory (rather than current directory) [#325](https://github.com/rubyzip/rubyzip/pull/325)
141
+
142
+ Tooling / Documentation:
143
+
144
+ - Turn off all terminal output in all tests [#361](https://github.com/rubyzip/rubyzip/pull/361)
145
+ - Several CI updates [#346](https://github.com/rubyzip/rubyzip/pull/346), [#347](https://github.com/rubyzip/rubyzip/pull/347), [#350](https://github.com/rubyzip/rubyzip/pull/350), [#352](https://github.com/rubyzip/rubyzip/pull/352)
146
+ - Several README improvements [#345](https://github.com/rubyzip/rubyzip/pull/345), [#326](https://github.com/rubyzip/rubyzip/pull/326), [#321](https://github.com/rubyzip/rubyzip/pull/321)
147
+
148
+ # 1.2.1
149
+
150
+ - Add accessor to @internal_file_attributes #304
151
+ - Extended globbing #303
152
+ - README updates #283, #289
153
+ - Cleanup after tests #298, #306
154
+ - Fix permissions on new zip files #294, #300
155
+ - Fix examples #297
156
+ - Support cp932 encoding #308
157
+ - Fix Directory traversal vulnerability #315
158
+ - Allow open_buffer to work without a given block #314
159
+
160
+ # 1.2.0
161
+
162
+ - Don't enable JRuby objectspace #252
163
+ - Fixes an exception thrown when decoding some weird .zip files #248
164
+ - Use duck typing with IO methods #244
165
+ - Added error for empty (zero bit) zip file #242
166
+ - Accept StringIO in Zip.open_buffer #238
167
+ - Do something more expected with new file permissions #237
168
+ - Case insensitivity option for #find_entry #222
169
+ - Fixes in documentation and examples
170
+
171
+ # 1.1.7
172
+
173
+ - Fix UTF-8 support for comments
174
+ - `Zip.sort_entries` working for zip output
175
+ - Prevent tempfile path from being unlinked by garbage collection
176
+ - NTFS Extra Field (0x000a) support
177
+ - Use String#tr instead of String#gsub
178
+ - Ability to not show warning about incorrect date
179
+ - Be smarter about handling buffer file modes.
180
+ - Support for Traditional Encryption (ZipCrypto)
181
+
182
+ # 1.1.6
183
+
184
+ - Revert "Return created zip file from Zip::File.open when supplied a block"
185
+
186
+ # 1.1.5
187
+
188
+ - Treat empty file as non-exists (@layerssss)
189
+ - Revert regression commit
190
+ - Return created zip file from Zip::File.open when supplied a block (@tpickett66)
191
+ - Zip::Entry::DEFLATED is forced on every file (@mehmetc)
192
+ - Add InputStream#ungetc (@zacstewart)
193
+ - Alias for legacy error names (@orien)
194
+
195
+ # 1.1.4
196
+
197
+ - Don't send empty string to stream (@mrloop)
198
+ - Zip::Entry::DEFLATED was forced on every file (@mehmetc)
199
+ - Alias for legacy error names (@orien)
200
+
201
+ # 1.1.3
202
+
203
+ - Fix compatibility of ::OutputStream::write_buffer (@orien)
204
+ - Clean up tempfiles from output stream (@iangreenleaf)
205
+
206
+ # 1.1.2
207
+
208
+ - Fix compatibility of ::Zip::File.write_buffer
209
+
210
+ # 1.1.1
211
+
212
+ - Speedup deflater (@loadhigh)
213
+ - Less Arrays and Strings allocations (@srawlins)
214
+ - Fix Zip64 writing support (@mrjamesriley)
215
+ - Fix StringIO support (@simonoff)
216
+ - Possibility to change default compression level
217
+ - Make Zip64 write support optional via configuration
218
+
219
+ # 1.1.0
220
+
221
+ - StringIO Support
222
+ - Zip64 Support
223
+ - Better jRuby Support
224
+ - Order of files in the archive can be sorted
225
+ - Other small fixes
226
+
227
+ # 1.0.0
228
+
229
+ - Removed support for Ruby 1.8
230
+ - Changed the API for gem. Now it can be used without require param in Gemfile.
231
+ - Added read-only support for Zip64 files.
232
+ - Added support for setting Unicode file names.
233
+
234
+ # 0.9.9
235
+
236
+ - Added support for backslashes in zip files (generated by the default Windows zip packer for example) and comment sections with the comment length set to zero even though there is actually a comment.
237
+
238
+ # 0.9.8
239
+
240
+ - Fixed: "Unitialized constant NullInputStream" error
241
+
242
+ # 0.9.5
243
+
244
+ - Removed support for loading ruby in zip files (ziprequire.rb).
245
+
246
+ # 0.9.4
247
+
248
+ - Changed ZipOutputStream.put_next_entry signature (API CHANGE!). Now allows comment, extra field and compression method to be specified.
249
+
250
+ # 0.9.3
251
+
252
+ - Fixed: Added ZipEntry::name_encoding which retrieves the character encoding of the name and comment of the entry.
253
+ - Added convenience methods ZipEntry::name_in(enc) and ZipEntry::comment_in(enc) for getting zip entry names and comments in a specified character encoding.
254
+
255
+ # 0.9.2
256
+
257
+ - Fixed: Renaming an entry failed if the entry's new name was a different length than its old name. (Diego Barros)
258
+
259
+ # 0.9.1
260
+
261
+ - Added symlink support and support for unix file permissions. Reduced memory usage during decompression.
262
+ - New methods ZipFile::[follow_symlinks, restore_times, restore_permissions, restore_ownership].
263
+ - New methods ZipEntry::unix_perms, ZipInputStream::eof?.
264
+ - Added documentation and test for new ZipFile::extract.
265
+ - Added some of the API suggestions from sf.net #1281314.
266
+ - Applied patch for sf.net bug #1446926.
267
+ - Applied patch for sf.net bug #1459902.
268
+ - Rework ZipEntry and delegate classes.
269
+
270
+ # 0.5.12
271
+
272
+ - Fixed problem with writing binary content to a ZipFile in MS Windows.
273
+
274
+ # 0.5.11
275
+
276
+ - Fixed name clash file method copy_stream from fileutils.rb. Fixed problem with references to constant CHUNK_SIZE.
277
+ - ZipInputStream/AbstractInputStream read is now buffered like ruby IO's read method, which means that read and gets etc can be mixed. The unbuffered read method has been renamed to sysread.
278
+
279
+ # 0.5.10
280
+
281
+ - Fixed method name resolution problem with FileUtils::copy_stream and IOExtras::copy_stream.
282
+
283
+ # 0.5.9
284
+
285
+ - Fixed serious memory consumption issue
286
+
287
+ # 0.5.8
288
+
289
+ - Fixed install script.
290
+
291
+ # 0.5.7
292
+
293
+ - install.rb no longer assumes it is being run from the toplevel source dir. Directory structure changed to reflect common ruby library project structure. Migrated from RubyUnit to Test::Unit format. Now uses Rake to build source packages and gems and run unit tests.
294
+
295
+ # 0.5.6
296
+
297
+ - Fix for FreeBSD 4.9 which returns Errno::EFBIG instead of Errno::EINVAL for some invalid seeks. Fixed 'version needed to extract'-field incorrect in local headers.
298
+
299
+ # 0.5.5
300
+
301
+ - Fix for a problem with writing zip files that concerns only ruby 1.8.1.
302
+
303
+ # 0.5.4
304
+
305
+ - Significantly reduced memory footprint when modifying zip files.
306
+
307
+ # 0.5.3
308
+
309
+ - Added optimization to avoid decompressing and recompressing individual entries when modifying a zip archive.
310
+
311
+ # 0.5.2
312
+
313
+ - Fixed ZipFile corruption bug in ZipFile class. Added basic unix extra-field support.
314
+
315
+ # 0.5.1
316
+
317
+ - Fixed ZipFile.get_output_stream bug.
318
+
319
+ # 0.5.0
320
+
321
+ - Ruby 1.8.0 and ruby-zlib 0.6.0 compatibility
322
+ - Changed method names from camelCase to rubys underscore style.
323
+ - Installs to zip/ subdir instead of directly to site_ruby
324
+ - Added ZipFile.directory and ZipFile.file - each method return an
325
+ object that can be used like Dir and File only for the contents of the
326
+ zip file.
327
+ - Added sample application zipfind which works like Find.find, only
328
+ Zip::ZipFind.find traverses into zip archives too.
329
+ - FIX: AbstractInputStream.each_line with non-default separator
330
+
331
+ # 0.5.0a
332
+
333
+ Source reorganized. Added ziprequire, which can be used to load ruby modules from a zip file, in a fashion similar to jar files in Java. Added gtk_ruby_zip, another sample application. Implemented ZipInputStream.lineno and ZipInputStream.rewind
334
+
335
+ Bug fixes:
336
+
337
+ - Read and write date and time information correctly for zip entries.
338
+ - Fixed read() using separate buffer, causing mix of gets/readline/read to cause problems.
339
+
340
+ # 0.4.2
341
+
342
+ - Performance optimizations. Test suite runs in half the time.
343
+
344
+ # 0.4.1
345
+
346
+ - Windows compatibility fixes.
347
+
348
+ # 0.4.0
349
+
350
+ - Zip::ZipFile is now mutable and provides a more convenient way of modifying zip archives than Zip::ZipOutputStream. Operations for adding, extracting, renaming, replacing and removing entries to zip archives are now available.
351
+ - Runs without warnings with -w switch.
352
+ - Install script install.rb added.
353
+
354
+ # 0.3.1
355
+
356
+ - Rudimentary support for writing zip archives.
357
+
358
+ # 0.2.2
359
+
360
+ - Fixed and extended unit test suite. Updated to work with ruby/zlib 0.5. It doesn't work with earlier versions of ruby/zlib.
361
+
362
+ # 0.2.0
363
+
364
+ - Class ZipFile added. Where ZipInputStream is used to read the individual entries in a zip file, ZipFile reads the central directory in the zip archive, so you can get to any entry in the zip archive without having to skipping through all the preceeding entries.
365
+
366
+ # 0.1.0
367
+
368
+ - First working version of ZipInputStream.