Home
last modified time | relevance | path

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

12

/external/cronet/net/websockets/
Dwebsocket_deflater_test.cc21 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST() local
22 deflater.Initialize(8); in TEST()
23 ASSERT_EQ(0u, deflater.CurrentOutputSize()); in TEST()
24 ASSERT_TRUE(deflater.Finish()); in TEST()
26 deflater.GetOutput(deflater.CurrentOutputSize()); in TEST()
28 ASSERT_EQ(0u, deflater.CurrentOutputSize()); in TEST()
32 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST() local
33 deflater.Initialize(15); in TEST()
36 ASSERT_TRUE(deflater.AddBytes("Hello", 5)); in TEST()
37 ASSERT_TRUE(deflater.Finish()); in TEST()
[all …]
Dwebsocket_inflater_test.cc190 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST() local
191 ASSERT_TRUE(deflater.Initialize(8)); in TEST()
198 ASSERT_TRUE(deflater.AddBytes(input.data(), input.size())); in TEST()
199 ASSERT_TRUE(deflater.Finish()); in TEST()
201 compressed = deflater.GetOutput(deflater.CurrentOutputSize()); in TEST()
204 ASSERT_EQ(0u, deflater.CurrentOutputSize()); in TEST()
Dwebsocket_deflate_stream_test.cc716 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST_F() local
717 deflater.Initialize(kWindowBits); in TEST_F()
720 deflater.AddBytes(original_data.data(), original_data.size()); in TEST_F()
721 deflater.Finish(); in TEST_F()
727 ToString(deflater.GetOutput(deflater.CurrentOutputSize()))); in TEST_F()
759 WebSocketDeflater deflater(WebSocketDeflater::TAKE_OVER_CONTEXT); in TEST_F() local
760 deflater.Initialize(kWindowBits); in TEST_F()
762 deflater.AddBytes(original_data.data(), original_data.size()); in TEST_F()
763 deflater.Finish(); in TEST_F()
769 ToString(deflater.GetOutput(deflater.CurrentOutputSize()))); in TEST_F()
[all …]
/external/apache-commons-compress/src/test/java/org/apache/commons/compress/archivers/sevenz/
DSevenZNativeHeapTest.java43 DelegatingDeflater delegatingDeflater = new DelegatingDeflater(outputStream.deflater); in testEndDeflaterOnCloseStream()
44 outputStream.deflater = delegatingDeflater; in testEndDeflaterOnCloseStream()
161 private final Deflater deflater; field in SevenZNativeHeapTest.DelegatingDeflater
163 public DelegatingDeflater(Deflater deflater) { in DelegatingDeflater() argument
164 this.deflater = deflater; in DelegatingDeflater()
172 deflater.end(); in end()
177 deflater.setInput(b, off, len); in setInput()
182 deflater.setInput(b); in setInput()
187 deflater.setDictionary(b, off, len); in setDictionary()
192 deflater.setDictionary(b); in setDictionary()
[all …]
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/zip/
DStreamCompressor.java63 StreamCompressor(final Deflater deflater) { in StreamCompressor() argument
64 this.def = deflater; in StreamCompressor()
74 static StreamCompressor create(final OutputStream os, final Deflater deflater) { in create() argument
75 return new OutputStreamCompressor(deflater, os); in create()
95 static StreamCompressor create(final DataOutput os, final Deflater deflater) { in create() argument
96 return new DataOutputCompressor(deflater, os); in create()
107 static StreamCompressor create(final SeekableByteChannel os, final Deflater deflater) { in create() argument
108 return new SeekableByteChannelCompressor(deflater, os); in create()
119 final Deflater deflater = new Deflater(compressionLevel, true); in create() local
120 return new ScatterGatherBackingStoreCompressor(deflater, bs); in create()
[all …]
/external/okhttp/okio/okio/src/main/java/okio/
DDeflaterSink.java39 private final Deflater deflater; field in DeflaterSink
42 public DeflaterSink(Sink sink, Deflater deflater) { in DeflaterSink() argument
43 this(Okio.buffer(sink), deflater); in DeflaterSink()
51 DeflaterSink(BufferedSink sink, Deflater deflater) { in DeflaterSink() argument
53 if (deflater == null) throw new IllegalArgumentException("inflater == null"); in DeflaterSink()
55 this.deflater = deflater; in DeflaterSink()
65 deflater.setInput(head.data, head.pos, toDeflate); in write()
95 ? deflater.deflate(s.data, s.limit, Segment.SIZE - s.limit, Deflater.SYNC_FLUSH) in deflate()
96 : deflater.deflate(s.data, s.limit, Segment.SIZE - s.limit); in deflate()
102 } else if (deflater.needsInput()) { in deflate()
[all …]
DGzipSink.java43 private final Deflater deflater; field in GzipSink
58 this.deflater = new Deflater(DEFAULT_COMPRESSION, true /* No wrap */); in GzipSink()
60 this.deflaterSink = new DeflaterSink(this.sink, deflater); in GzipSink()
98 deflater.end(); in close()
126 sink.writeIntLe(deflater.getTotalIn()); // Length of original data. in writeFooter()
/external/okhttp/repackaged/okio/okio/src/main/java/com/android/okhttp/okio/
DDeflaterSink.java41 private final Deflater deflater; field in DeflaterSink
44 public DeflaterSink(Sink sink, Deflater deflater) { in DeflaterSink() argument
45 this(Okio.buffer(sink), deflater); in DeflaterSink()
53 DeflaterSink(BufferedSink sink, Deflater deflater) { in DeflaterSink() argument
55 if (deflater == null) throw new IllegalArgumentException("inflater == null"); in DeflaterSink()
57 this.deflater = deflater; in DeflaterSink()
67 deflater.setInput(head.data, head.pos, toDeflate); in write()
97 ? deflater.deflate(s.data, s.limit, Segment.SIZE - s.limit, Deflater.SYNC_FLUSH) in deflate()
98 : deflater.deflate(s.data, s.limit, Segment.SIZE - s.limit); in deflate()
104 } else if (deflater.needsInput()) { in deflate()
[all …]
DGzipSink.java45 private final Deflater deflater; field in GzipSink
60 this.deflater = new Deflater(DEFAULT_COMPRESSION, true /* No wrap */); in GzipSink()
62 this.deflaterSink = new DeflaterSink(this.sink, deflater); in GzipSink()
100 deflater.end(); in close()
128 sink.writeIntLe(deflater.getTotalIn()); // Length of original data. in writeFooter()
/external/okio/okio/src/jvmMain/kotlin/okio/
DDeflaterSink.kt47 internal constructor(private val sink: BufferedSink, private val deflater: Deflater) : Sink { constant in okio.DeflaterSink
48 constructor(sink: Sink, deflater: Deflater) : this(sink.buffer(), deflater)
61 deflater.setInput(head.data, head.pos, toDeflate) in write()
89 deflater.deflate(s.data, s.limit, Segment.SIZE - s.limit, Deflater.SYNC_FLUSH) in deflate()
91 deflater.deflate(s.data, s.limit, Segment.SIZE - s.limit) in deflate()
98 } else if (deflater.needsInput()) { in deflate()
116 deflater.finish() in finishDeflate()
134 deflater.end() in close()
160 inline fun Sink.deflate(deflater: Deflater = Deflater()): DeflaterSink =
161 DeflaterSink(this, deflater)
DGzipSink.kt48 val deflater = Deflater(DEFAULT_COMPRESSION, true /* No wrap */) constant
54 private val deflaterSink = DeflaterSink(this.sink, deflater)
105 deflater.end() in flush()
123 sink.writeIntLe(deflater.bytesRead.toInt()) // Length of original data. in writeFooter()
144 fun deflater() = deflater method
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/compressors/gzip/
DGzipCompressorOutputStream.java53 private final Deflater deflater; field in GzipCompressorOutputStream
83 this.deflater = new Deflater(parameters.getCompressionLevel(), true); in GzipCompressorOutputStream()
128 buffer.putInt(deflater.getTotalIn()); in writeTrailer()
155 if (deflater.finished()) { in write()
159 deflater.setInput(buffer, offset, length); in write()
161 while (!deflater.needsInput()) { in write()
170 final int length = deflater.deflate(deflateBuffer, 0, deflateBuffer.length); in deflate()
183 if (!deflater.finished()) { in finish()
184 deflater.finish(); in finish()
186 while (!deflater.finished()) { in finish()
[all …]
/external/okio/okio/src/jvmTest/kotlin/okio/
DDeflateKotlinTest.kt28 val deflater = (data as Sink).deflate() in deflate() constant
29 deflater.buffer().writeUtf8("Hi!").close() in deflate()
35 val deflater = (data as Sink).deflate(Deflater(0, true)) in deflateWithDeflater() constant
36 deflater.buffer().writeUtf8("Hi!").close() in deflateWithDeflater()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/compressors/deflate/
DDeflateCompressorOutputStream.java34 private final Deflater deflater; field in DeflateCompressorOutputStream
53 … this.deflater = new Deflater(parameters.getCompressionLevel(), !parameters.withZlibHeader()); in DeflateCompressorOutputStream()
54 this.out = new DeflaterOutputStream(outputStream, deflater); in DeflateCompressorOutputStream()
92 deflater.end(); in close()
/external/apache-commons-compress/src/main/java/org/apache/commons/compress/archivers/sevenz/
DCoders.java153 final Deflater deflater = new Deflater(level, true); in encode() local
154 … final DeflaterOutputStream deflaterOutputStream = new DeflaterOutputStream(out, deflater); in encode()
155 return new DeflateDecoderOutputStream(deflaterOutputStream, deflater); in encode()
197 Deflater deflater; field in Coders.DeflateDecoder.DeflateDecoderOutputStream
200 Deflater deflater) { in DeflateDecoderOutputStream() argument
202 this.deflater = deflater; in DeflateDecoderOutputStream()
225 deflater.end(); in close()
/external/okhttp/okio/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()
117 Deflater deflater = new Deflater(); in closeWithExceptionWhenWritingAndClosing() local
118 deflater.setLevel(Deflater.NO_COMPRESSION); in closeWithExceptionWhenWritingAndClosing()
119 DeflaterSink deflaterSink = new DeflaterSink(mockSink, deflater); in closeWithExceptionWhenWritingAndClosing()
/external/okio/okio/src/jvmTest/java/okio/
DDeflaterSinkTest.java82 Deflater deflater = new Deflater(); in multipleSegmentsWithoutCompression() local
83 deflater.setLevel(Deflater.NO_COMPRESSION); in multipleSegmentsWithoutCompression()
84 DeflaterSink deflaterSink = new DeflaterSink(buffer, deflater); in multipleSegmentsWithoutCompression()
118 Deflater deflater = new Deflater(); in closeWithExceptionWhenWritingAndClosing() local
119 deflater.setLevel(Deflater.NO_COMPRESSION); in closeWithExceptionWhenWritingAndClosing()
120 DeflaterSink deflaterSink = new DeflaterSink(mockSink, deflater); in closeWithExceptionWhenWritingAndClosing()
/external/rust/crates/flate2/examples/
Ddeflatedecoder-write.rs21 let mut deflater = DeflateDecoder::new(writer); in decode_reader() localVariable
22 deflater.write_all(&bytes[..])?; in decode_reader()
23 writer = deflater.finish()?; in decode_reader()
Ddeflateencoder-read.rs17 let mut deflater = DeflateEncoder::new(&c[..], Compression::fast()); in deflateencoder_read_hello_world() localVariable
18 deflater.read_to_end(&mut result)?; in deflateencoder_read_hello_world()
Ddeflateencoder-bufread.rs20 let mut deflater = DeflateEncoder::new(b, Compression::fast()); in open_hello_world() localVariable
22 deflater.read_to_end(&mut buffer)?; in open_hello_world()
Ddeflatedecoder-read.rs20 let mut deflater = DeflateDecoder::new(&bytes[..]); in decode_reader() localVariable
22 deflater.read_to_string(&mut s)?; in decode_reader()
Ddeflatedecoder-bufread.rs20 let mut deflater = DeflateDecoder::new(&bytes[..]); in decode_reader() localVariable
22 deflater.read_to_string(&mut s)?; in decode_reader()
/external/cronet/net/server/
Dweb_socket_encoder.cc227 auto deflater = std::make_unique<WebSocketDeflater>( in CreateServer() local
231 if (!deflater->Initialize(response.PermissiveServerMaxWindowBits()) || in CreateServer()
238 FOR_SERVER, std::move(deflater), std::move(inflater))); in CreateServer()
273 auto deflater = std::make_unique<WebSocketDeflater>( in CreateClient() local
277 if (!deflater->Initialize(params.PermissiveClientMaxWindowBits()) || in CreateClient()
283 return base::WrapUnique(new WebSocketEncoder(FOR_CLIENT, std::move(deflater), in CreateClient()
288 std::unique_ptr<WebSocketDeflater> deflater, in WebSocketEncoder() argument
291 deflater_(std::move(deflater)), in WebSocketEncoder()
Dweb_socket_encoder.h60 std::unique_ptr<WebSocketDeflater> deflater,
/external/okhttp/okhttp/src/main/java/com/squareup/okhttp/internal/framed/
DSpdy3.java298 Deflater deflater = new Deflater(); in Writer() local
299 deflater.setDictionary(DICTIONARY); in Writer()
301 headerBlockOut = Okio.buffer(new DeflaterSink(headerBlockBuffer, deflater)); in Writer()

12