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

Side by Side Diff: runtime/bin/filter.dart

Issue 11275035: Introduce (private) ZLibFilter to dart:io. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Move bufferlength out as a top level constant. Created 8 years, 1 month ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
(Empty)
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file.
4
5
6 abstract class _Filter {
7 /**
8 * Call to process a chunk of data. A call to [process] should only be made
9 * when [processed] returns [null].
10 */
11 void process(List<int> data);
12
13 /**
14 * Get a chunk of processed data. When there are no more data available,
15 * [processed] will return [null]. Set [flush] to [false] for non-final
16 * calls to improve performance of some filters.
17 */
18 List<int> processed([bool flush = true]);
Søren Gjesse 2012/10/25 11:01:44 Maybe named argument instead of positional.
19
20 /**
21 * Mark the filter as closed. Always call this method for any filter created
22 * to avoid leaking resources. [end] can be called at any time, but any
23 * successive calls to [process] or [processed] will fail.
24 */
25 void end();
26 }
27
28 class GZipDeflateFilter implements _Filter {
29 factory GZipDeflateFilter()
30 => new _GZipDeflateFilterImpl();
31 }
32
33 class ZLibInflateFilter implements _Filter {
34 factory ZLibInflateFilter() => new _ZLibInflateFilterImpl();
35 }
36
OLDNEW
« runtime/bin/filter.cc ('K') | « runtime/bin/filter.cc ('k') | runtime/bin/filter_impl.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698