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

Side by Side Diff: net/docs/filter.md

Issue 1662763002: [ON HOLD] Implement pull-based design for content decoding (Closed) Base URL: https://chromium.googlesource.com/chromium/src.git@master
Patch Set: Fix components_unittests Created 4 years, 5 months 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
OLDNEW
(Empty)
1 The network stack implements support for Content-Encodings using "filters",
2 which can be composed together and mutate all the incoming bytes from a
3 URLRequestJob. Currently, the following filters are implemented:
4
5 * gzip (handling "deflate" and "gzip" Content-Encodings)
6 * sdch (handling "sdch" Content-Encoding)
7 * brotili (handling "br" Content-Encoding)
eustas 2016/07/22 12:29:19 s/brotili/brotli
xunjieli 2016/07/27 20:32:03 Done.
8
9 Filters conceptually form a chain, with the URLRequestJob as both the beginning
10 and end of the chain, meaning the URLRequestJob produces raw bytes at the
11 beginning and consumes filtered bytes at the end. For example, to support a
12 hypothetical "Content-Encoding: bar,foo", filters would be arranged like so,
13 with "X --> Y" meaning "Y reads bytes from X":
14
15 URLRequestJob --> FooFilter --> BarFilter --> URLRequestJob
16
17 Here the URLRequestJob pulls filtered bytes from BarFilter, which pulls filtered
18 bytes from FooFilter, which in turn pulls raw bytes from the URLRequestJob.
19
20 All filters conform to the following interface (named StreamSource in the tree):
21
22 int Read(IOBuffer* dest_buffer, size_t buffer_size,
23 const OnReadCompleteCallback& callback);
24
25 This function can return either synchronously or asynchronously via the supplied
26 callback. The filter chain is "pull-based", in that data does not propagate
27 through the filter chain until requested by the final consumer of the filtered
28 data.
OLDNEW
« no previous file with comments | « net/DEPS ('k') | net/filter/brotli_filter.h » ('j') | net/filter/brotli_stream_source.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698