Search Options

Display Count
Sort
Preferred Language
Advanced Search

Results 1 - 10 of 114 for GZIP (0.02 seconds)

  1. okhttp/src/commonJvmAndroid/kotlin/okhttp3/Gzip.kt

     */
    package okhttp3
    
    import okhttp3.CompressionInterceptor.DecompressionAlgorithm
    import okio.BufferedSource
    import okio.GzipSource
    import okio.Source
    
    object Gzip : DecompressionAlgorithm {
      override val encoding: String get() = "gzip"
    
      override fun decompress(compressedSource: BufferedSource): Source = GzipSource(compressedSource)
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Oct 07 15:15:28 GMT 2025
    - 936 bytes
    - Click Count (0)
  2. okhttp-brotli/src/main/kotlin/okhttp3/brotli/BrotliInterceptor.kt

    package okhttp3.brotli
    
    import okhttp3.CompressionInterceptor
    import okhttp3.Gzip
    
    /**
     * Transparent Brotli response support.
     *
     * Adds Accept-Encoding: br to request and checks (and strips) for Content-Encoding: br in
     * responses.  n.b. this replaces the transparent gzip compression in BridgeInterceptor.
     */
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Tue Oct 07 15:15:28 GMT 2025
    - 979 bytes
    - Click Count (0)
  3. cmd/metacache-entries_test.go

    null-long-match.wb.expect-noinput", "src/compress/flate/token.go", "src/compress/flate/writer_test.go", "src/compress/gzip/", "src/compress/gzip/example_test.go", "src/compress/gzip/gunzip.go", "src/compress/gzip/gunzip_test.go", "src/compress/gzip/gzip.go", "src/compress/gzip/gzip_test.go", "src/compress/gzip/issue14937_test.go", "src/compress/gzip/testdata/", "src/compress/gzip/testdata/issue6550.gz.base64", "src/compress/lzw/", "src/compress/lzw/reader.go", "src/compress/lzw/reader_test.go", ...
    Created: Sun Apr 05 19:28:12 GMT 2026
    - Last Modified: Fri Aug 29 02:39:48 GMT 2025
    - 31.6K bytes
    - Click Count (0)
  4. okhttp-brotli/src/test/java/okhttp3/brotli/BrotliInterceptorTest.kt

        val response =
          response("https://httpbin.org/gzip", s.decodeHex()) {
            header("Content-Encoding", "gzip")
          }
    
        val uncompressed = brotliInterceptor.decompress(response)
    
        val responseString = uncompressed.body.string()
        assertThat(responseString).contains("\"gzipped\": true,")
        assertThat(responseString).contains("\"Accept-Encoding\": \"br,gzip\"")
      }
    
      @Test
      fun testNoUncompress() {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Aug 22 08:12:58 GMT 2025
    - 4.4K bytes
    - Click Count (0)
  5. okhttp/src/commonTest/kotlin/okhttp3/CompressionInterceptorTest.kt

      }
    
      @Test
      fun gzipThroughCall() {
        val gzip = CompressionInterceptor(Gzip)
        val client =
          clientTestRule
            .newClientBuilder()
            .addInterceptor(gzip)
            .addInterceptor { chain ->
              assertThat(chain.request().header("Accept-Encoding")).isEqualTo("gzip")
    
              Response
                .Builder()
                .request(chain.request())
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Aug 01 06:04:22 GMT 2025
    - 3K bytes
    - Click Count (0)
  6. docs/en/docs/advanced/middleware.md

    ## `GZipMiddleware` { #gzipmiddleware }
    
    Handles GZip responses for any request that includes `"gzip"` in the `Accept-Encoding` header.
    
    The middleware will handle both standard and streaming responses.
    
    {* ../../docs_src/advanced_middleware/tutorial003_py310.py hl[2,6] *}
    
    The following arguments are supported:
    
    * `minimum_size` - Do not GZip responses that are smaller than this minimum size in bytes. Defaults to `500`.
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Thu Mar 05 18:13:19 GMT 2026
    - 4.1K bytes
    - Click Count (0)
  7. docs_src/custom_request_and_route/tutorial001_py310.py

    import gzip
    from collections.abc import Callable
    
    from fastapi import Body, FastAPI, Request, Response
    from fastapi.routing import APIRoute
    
    
    class GzipRequest(Request):
        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
                self._body = body
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 10 08:55:32 GMT 2025
    - 976 bytes
    - Click Count (0)
  8. docs_src/custom_request_and_route/tutorial001_an_py310.py

    import gzip
    from collections.abc import Callable
    from typing import Annotated
    
    from fastapi import Body, FastAPI, Request, Response
    from fastapi.routing import APIRoute
    
    
    class GzipRequest(Request):
        async def body(self) -> bytes:
            if not hasattr(self, "_body"):
                body = await super().body()
                if "gzip" in self.headers.getlist("Content-Encoding"):
                    body = gzip.decompress(body)
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Wed Dec 10 08:55:32 GMT 2025
    - 1015 bytes
    - Click Count (0)
  9. okhttp-zstd/src/test/java/okhttp3/zstd/ZstdInterceptorTest.kt

    import okio.ByteString.Companion.EMPTY
    import okio.ByteString.Companion.encodeUtf8
    import okio.Sink
    import okio.buffer
    import okio.gzip
    import org.junit.jupiter.api.Test
    
    class ZstdInterceptorTest {
      val zstdInterceptor = CompressionInterceptor(Zstd, Gzip)
    
      @Test
      fun testDecompressZstd() {
        val s = "hello zstd world".encodeUtf8().zstdCompress()
    
        val response =
          response("https://example.com/", s) {
    Created: Fri Apr 03 11:42:14 GMT 2026
    - Last Modified: Fri Aug 01 06:04:22 GMT 2025
    - 4.8K bytes
    - Click Count (1)
  10. docs/ko/docs/how-to/custom-request-and-route.md

    * 모든 요청 바디를 자동으로 로깅하기.
    
    ## 커스텀 요청 바디 인코딩 처리하기 { #handling-custom-request-body-encodings }
    
    커스텀 `Request` 서브클래스를 사용해 gzip 요청의 압축을 해제하는 방법을 살펴보겠습니다.
    
    그리고 그 커스텀 요청 클래스를 사용하기 위한 `APIRoute` 서브클래스도 함께 보겠습니다.
    
    ### 커스텀 `GzipRequest` 클래스 만들기 { #create-a-custom-gziprequest-class }
    
    /// tip | 팁
    
    이 예시는 동작 방식 시연을 위한 장난감 예제입니다. Gzip 지원이 필요하다면 제공되는 [`GzipMiddleware`](../advanced/middleware.md#gzipmiddleware)를 사용할 수 있습니다.
    
    ///
    
    Created: Sun Apr 05 07:19:11 GMT 2026
    - Last Modified: Fri Mar 20 14:06:26 GMT 2026
    - 5.2K bytes
    - Click Count (0)
Back to Top