Home
last modified time | relevance | path

Searched refs:deflater (Results 1 – 9 of 9) sorted by relevance

/external/chromium_org/net/websockets/
Dwebsocket_deflater_test.cc22 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST() local
23 deflater.Initialize(8); in TEST()
24 ASSERT_EQ(0u, deflater.CurrentOutputSize()); in TEST()
25 ASSERT_TRUE(deflater.Finish()); in TEST()
27 deflater.GetOutput(deflater.CurrentOutputSize()); in TEST()
29 ASSERT_EQ(0u, deflater.CurrentOutputSize()); in TEST()
33 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST() local
34 deflater.Initialize(15); in TEST()
37 ASSERT_TRUE(deflater.AddBytes("Hello", 5)); in TEST()
38 ASSERT_TRUE(deflater.Finish()); in TEST()
[all …]
Dwebsocket_inflater_test.cc191 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST() local
192 ASSERT_TRUE(deflater.Initialize(8)); in TEST()
199 ASSERT_TRUE(deflater.AddBytes(&input[0], input.size())); in TEST()
200 ASSERT_TRUE(deflater.Finish()); in TEST()
202 compressed = deflater.GetOutput(deflater.CurrentOutputSize()); in TEST()
205 ASSERT_EQ(0u, deflater.CurrentOutputSize()); in TEST()
Dwebsocket_deflate_stream_test.cc695 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST_F() local
696 deflater.Initialize(kWindowBits); in TEST_F()
699 deflater.AddBytes(original_data.data(), original_data.size()); in TEST_F()
700 deflater.Finish(); in TEST_F()
706 ToString(deflater.GetOutput(deflater.CurrentOutputSize()))); in TEST_F()
738 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST_F() local
739 deflater.Initialize(kWindowBits); in TEST_F()
741 deflater.AddBytes(original_data.data(), original_data.size()); in TEST_F()
742 deflater.Finish(); in TEST_F()
748 ToString(deflater.GetOutput(deflater.CurrentOutputSize()))); in TEST_F()
[all …]
/external/chromium_org/third_party/WebKit/Source/modules/websockets/
DWebSocketDeflaterTest.cpp38 OwnPtr<WebSocketDeflater> deflater = WebSocketDeflater::create(15); in TEST() local
39 ASSERT_TRUE(deflater->initialize()); in TEST()
45 ASSERT_TRUE(deflater->addBytes(inputData, inputLength)); in TEST()
46 ASSERT_TRUE(deflater->finish()); in TEST()
48 EXPECT_EQ(7U, deflater->size()); in TEST()
49 EXPECT_EQ(0, memcmp(expectedFirst, deflater->data(), deflater->size())); in TEST()
50 ASSERT_TRUE(inflater->addBytes(deflater->data(), deflater->size())); in TEST()
55 deflater->reset(); in TEST()
58 ASSERT_TRUE(deflater->addBytes(inputData, inputLength)); in TEST()
59 ASSERT_TRUE(deflater->finish()); in TEST()
[all …]
/external/okhttp/okio/src/main/java/okio/
DDeflaterSink.java39 private final Deflater deflater; field in DeflaterSink
42 public DeflaterSink(Sink sink, Deflater deflater) { in DeflaterSink() argument
44 this.deflater = deflater; in DeflaterSink()
54 deflater.setInput(head.data, head.pos, toDeflate); in write()
81 ? deflater.deflate(s.data, s.limit, Segment.SIZE - s.limit, Deflater.SYNC_FLUSH) in deflate()
82 : deflater.deflate(s.data, s.limit, Segment.SIZE - s.limit); in deflate()
88 } else if (deflater.needsInput()) { in deflate()
106 deflater.finish(); in close()
113 deflater.end(); in close()
/external/okhttp/okio/src/test/java/okio/
DDeflaterSinkTest.java81 Deflater deflater = new Deflater(); in multipleSegmentsWithoutCompression() local
82 deflater.setLevel(Deflater.NO_COMPRESSION); in multipleSegmentsWithoutCompression()
83 DeflaterSink deflaterSink = new DeflaterSink(buffer, deflater); in multipleSegmentsWithoutCompression()
99 Deflater deflater = new Deflater(); in closeWithExceptionWhenWritingAndClosing() local
100 deflater.setLevel(Deflater.NO_COMPRESSION); in closeWithExceptionWhenWritingAndClosing()
101 DeflaterSink deflaterSink = new DeflaterSink(mockSink, deflater); in closeWithExceptionWhenWritingAndClosing()
/external/okhttp/android/main/java/com/squareup/okhttp/internal/
DPlatform.java168 OutputStream out, Deflater deflater, boolean syncFlush) { in newDeflaterOutputStream() argument
169 return new DeflaterOutputStream(out, deflater, syncFlush); in newDeflaterOutputStream()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/spdy/
DSpdy3.java304 Deflater deflater = new Deflater(); in Writer() local
305 deflater.setDictionary(DICTIONARY); in Writer()
307 headerBlockOut = Okio.buffer(new DeflaterSink(headerBlockBuffer, deflater)); in Writer()
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/
DPlatform.java134 public OutputStream newDeflaterOutputStream(OutputStream out, Deflater deflater, in newDeflaterOutputStream() argument
142 return constructor.newInstance(out, deflater, syncFlush); in newDeflaterOutputStream()