Commit Graph

16 Commits

Author SHA1 Message Date
Felix Bünemann 7a4b8bb048 Fix high memory usage due to Deflater buffering
When support for ZipCrypto was added, an internal StringIO buffer was
added to Deflater, in order to fix a decryption bug. While this worked,
it caused unlimited memory growth when compressing large files. The
proper fix is to writer the encryption header in init_next_entry instead
of finalize_current_entry, so the headers are written before any
encrypted data. Because of this fix we can remove the buffering in
Deflater, which keeps memory usage low and allows to stream compressed
data while it is written.

This should fix issue #233.
2015-10-17 17:06:41 +02:00
Pavel Lobashov c0177a455b Merge branch 'master' into rubocop_fixes
Conflicts:
	README.md
	samples/example_recursive.rb
2015-06-08 10:14:25 +03:00
Vít Ondruch 32016ab1bf Remove executable bit. 2015-03-31 13:15:46 +02:00
Pavel.Lobashov 73e5f70bdf fix rubocop Style/SpaceAfterMethodName cop 2015-03-22 19:43:44 +03:00
Pavel Lobashov b9a757e045 fix rubocop Style/EmptyLinesAroundClassBody cop 2015-03-21 11:21:26 +03:00
Pavel Lobashov 6c46c21abb fix rubocop Style/ColonMethodCall cop 2015-03-21 11:16:06 +03:00
Shigeaki Matsumura 85a7bbdf1a add data descriptor for each entries when encrypto 2015-01-08 18:30:32 +09:00
Shigeaki Matsumura bd5a7e4081 fix to file size with encrption 2015-01-07 10:45:01 +09:00
Shigeaki Matsumura fd26052525 fix to encryption bug 2015-01-04 22:49:58 +09:00
Shigeaki Matsumura c70e5836c7 support traditional encryption 2015-01-01 11:09:17 +09:00
René Sprotte 471aa1599e Add config to set the default compression level. 2014-01-20 14:38:22 +01:00
Alexander Simonov 317fdd0d04 Add posibility to set Language encoding flag. Changed way to set settings. 2013-08-15 01:00:27 +03:00
Alexander Simonov 974f5675c2 Code refactoring start 2013-06-02 21:33:03 +03:00
Julien Ammous 07068d1134 bugfix: get correct size for utf8 strings 2012-04-12 12:01:40 +02:00
Alexander Simonov 3418d31b44 Code cleanup 2011-11-17 22:53:04 +02:00
Alan Harper cd038ae442 Split Zip module up by class in to seperate files 2010-11-30 18:27:59 +10:00