Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(54)

Issue 130513003: [ZLIB] Add support for windowBits, memLevel, raw (Closed)

Created:
6 years, 11 months ago by vicb
Modified:
6 years, 9 months ago
CC:
reviews_dartlang.org, vm-dev_dartlang.org
Visibility:
Public.

Description

[ZLIB] Add support for windowBits, memLevel, raw BUG=159367 **BC breaks:** All public (API) classes that used to be const are not const any more. This allow checking the validity of input parameters in the constructor body. - ZLibCodec, - GZipCodec, - ZLibEncoder, - ZLibDecoder The globals codecs GZIP and ZLIB are now final we should be ok (the class contain only final properties, ie no state). What should be done: (- finer grained exceptions, -> later change) (- Handle the flush modes but probably in an other patch as the updates might be more complex.) Done: Patch Set #1 - add some more docs, - support for memLevel. Patch Set #2: - implement dictionaries (todo: fix mem management), - integrate review feedback, - fix CC, - rebased on master Patch Set #4: - support for strategy, - add some checks (ie checking the level, memLevel, ...) this could imply adding a constructor body (Codecs, Coders) but this would force making the const non const and break BC, thoughts ? - Add ZLIB constants Dart side. - Refactor the tests and test only some levels rather all which was unit testing rather more than the extension. It saves some test time. Patch Set #8: - fix mem management for dictionaries, R=ajohnsen@google.com, lrn@google.com Committed: https://code.google.com/p/dart/source/detail?r=33206

Patch Set 1 #

Total comments: 1

Patch Set 2 : Add support for memLevel #

Total comments: 11

Patch Set 3 : rebase, integrate feedback, fix cc #

Patch Set 4 : constants, checks, strategy #

Patch Set 5 : Almost done, need help #

Total comments: 36

Patch Set 6 : integrate Anders feedback #

Patch Set 7 : memory management #

Patch Set 8 : fix dictionary memory management #

Total comments: 49

Patch Set 9 : integrate feedback #

Patch Set 10 : fix previous CL #

Patch Set 11 : should fix the mess, sorry ! #

Total comments: 6

Patch Set 12 : integrate feedback #

Total comments: 9

Patch Set 13 : integrate feedback #

Unified diffs Side-by-side diffs Delta from patch set Stats (+707 lines, -205 lines) Patch
M runtime/bin/filter.h View 1 2 3 4 5 6 7 3 chunks +23 lines, -13 lines 0 comments Download
M runtime/bin/filter.cc View 1 2 3 4 5 6 7 8 9 10 11 12 8 chunks +141 lines, -58 lines 0 comments Download
M runtime/bin/filter_patch.dart View 1 2 3 4 5 6 1 chunk +21 lines, -10 lines 0 comments Download
M runtime/bin/io_natives.cc View 1 2 3 4 1 chunk +2 lines, -2 lines 0 comments Download
M runtime/include/dart_api.h View 1 2 3 4 5 6 2 chunks +2 lines, -2 lines 0 comments Download
M sdk/lib/io/data_transformer.dart View 1 2 3 4 5 6 7 8 9 10 11 12 11 chunks +361 lines, -57 lines 0 comments Download
M tests/standalone/io/zlib_test.dart View 1 2 3 4 5 6 7 8 9 10 11 12 4 chunks +157 lines, -63 lines 0 comments Download

Messages

Total messages: 23 (0 generated)
vicb
https://codereview.chromium.org/130513003/diff/1/sdk/lib/io/data_transformer.dart File sdk/lib/io/data_transformer.dart (right): https://codereview.chromium.org/130513003/diff/1/sdk/lib/io/data_transformer.dart#newcode53 sdk/lib/io/data_transformer.dart:53: const ZLibCodec({this.level: 6, this.windowBits: 15, this.raw: false}); Adding some ...
6 years, 11 months ago (2014-01-09 09:48:26 UTC) #1
vicb
One question that I have is how to "share" constants (ie C #define) across c++ ...
6 years, 11 months ago (2014-01-09 10:22:03 UTC) #2
vicb
Anders, I have the support for dictionary that is almost ready. I am still not ...
6 years, 11 months ago (2014-01-14 16:22:48 UTC) #3
Anders Johnsen
Overall, this is looking nice. Thank you for taking the time to also add more ...
6 years, 11 months ago (2014-01-15 10:52:08 UTC) #4
vicb
Thanks for the review. https://codereview.chromium.org/130513003/diff/70001/runtime/bin/filter.h File runtime/bin/filter.h (right): https://codereview.chromium.org/130513003/diff/70001/runtime/bin/filter.h#newcode57 runtime/bin/filter.h:57: ZLibDeflateFilter(bool gzip = false, int ...
6 years, 11 months ago (2014-01-15 11:08:03 UTC) #5
Anders Johnsen
https://codereview.chromium.org/130513003/diff/70001/sdk/lib/io/data_transformer.dart File sdk/lib/io/data_transformer.dart (right): https://codereview.chromium.org/130513003/diff/70001/sdk/lib/io/data_transformer.dart#newcode68 sdk/lib/io/data_transformer.dart:68: const ZLibCodec({this.level: 6, this.windowBits: 15, this.raw: false, On 2014/01/15 ...
6 years, 11 months ago (2014-01-15 11:34:17 UTC) #6
vicb
Anders, I have rebase on latest master, integrated your feedback and fix some CC. I'll ...
6 years, 11 months ago (2014-01-23 09:14:04 UTC) #7
vicb
Anders, I am almost done with this patch, but I can not figure out a ...
6 years, 11 months ago (2014-01-24 13:36:18 UTC) #8
Anders Johnsen
Here's the first round of comments. I hope this can help you solve your problems ...
6 years, 11 months ago (2014-01-27 12:27:44 UTC) #9
vicb
Anders, It didn't help me much but I'll try to take an other look now, ...
6 years, 11 months ago (2014-01-27 15:14:18 UTC) #10
vicb
Anders, The memory management is now fixed, could you please take a look at it ...
6 years, 10 months ago (2014-01-29 11:38:12 UTC) #11
Anders Johnsen
Adding @lrn for more comments on the API. This is starting to look very nice ...
6 years, 10 months ago (2014-02-04 12:30:44 UTC) #12
Lasse Reichstein Nielsen
Comments. Lots of comments. :) https://codereview.chromium.org/130513003/diff/370001/sdk/lib/io/data_transformer.dart File sdk/lib/io/data_transformer.dart (right): https://codereview.chromium.org/130513003/diff/370001/sdk/lib/io/data_transformer.dart#newcode9 sdk/lib/io/data_transformer.dart:9: const int ZLIB_MIN_WINDOW_BITS = ...
6 years, 10 months ago (2014-02-04 13:11:56 UTC) #13
vicb
No problem for the number / length of comments, quite the opposite actually, I appreciate ...
6 years, 10 months ago (2014-02-04 19:55:13 UTC) #14
Lasse Reichstein Nielsen
Excellent! https://codereview.chromium.org/130513003/diff/490001/sdk/lib/io/data_transformer.dart File sdk/lib/io/data_transformer.dart (right): https://codereview.chromium.org/130513003/diff/490001/sdk/lib/io/data_transformer.dart#newcode9 sdk/lib/io/data_transformer.dart:9: /// Minimal value for [windowBits] There is no ...
6 years, 10 months ago (2014-02-05 10:33:31 UTC) #15
vicb
every pending reviews should be fixed in the latest commit. https://codereview.chromium.org/130513003/diff/490001/sdk/lib/io/data_transformer.dart File sdk/lib/io/data_transformer.dart (right): https://codereview.chromium.org/130513003/diff/490001/sdk/lib/io/data_transformer.dart#newcode9 ...
6 years, 10 months ago (2014-02-06 13:54:05 UTC) #16
Lasse Reichstein Nielsen
Apart from indentation, LGTM! What do you say, Anders? https://codereview.chromium.org/130513003/diff/530001/sdk/lib/io/data_transformer.dart File sdk/lib/io/data_transformer.dart (right): https://codereview.chromium.org/130513003/diff/530001/sdk/lib/io/data_transformer.dart#newcode40 sdk/lib/io/data_transformer.dart:40: ...
6 years, 10 months ago (2014-02-07 07:56:43 UTC) #17
Anders Johnsen
This is looking really nice! :) https://codereview.chromium.org/130513003/diff/530001/runtime/bin/filter.cc File runtime/bin/filter.cc (right): https://codereview.chromium.org/130513003/diff/530001/runtime/bin/filter.cc#newcode128 runtime/bin/filter.cc:128: delete[] dictionary; With ...
6 years, 10 months ago (2014-02-07 08:18:04 UTC) #18
vicb
Anders, Lasse, Thank you both for youe patience and very valuable feedback. I have integrated ...
6 years, 10 months ago (2014-02-07 08:43:45 UTC) #19
Anders Johnsen
LGTM! :)
6 years, 10 months ago (2014-02-07 08:51:59 UTC) #20
Anders Johnsen
Committed patchset #13 manually as r33206 (presubmit successful).
6 years, 9 months ago (2014-03-03 11:43:19 UTC) #21
Anders Johnsen
FYI, sizeof(dictionary_) will return the pointer width, not the size of the dictionary :) Fixed ...
6 years, 9 months ago (2014-03-03 13:19:04 UTC) #22
vicb
6 years, 9 months ago (2014-03-03 13:32:00 UTC) #23
Message was sent while issue was closed.
On 2014/03/03 13:19:04, Anders Johnsen wrote:
> FYI, sizeof(dictionary_) will return the pointer width, not the size of the
> dictionary :) Fixed in a follow-up.

Oops... of course ! Thanks for catching (& fixing) this and merging this CL.

Powered by Google App Engine
This is Rietveld 408576698