Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 1 of 1 for resizeBuffer (0.24 sec)

  1. okhttp/src/main/kotlin/okhttp3/internal/ws/MessageDeflater.kt

        if (deflatedBytes.endsWith(EMPTY_DEFLATE_BLOCK)) {
          val newSize = deflatedBytes.size - LAST_OCTETS_COUNT_TO_REMOVE_AFTER_DEFLATION
          deflatedBytes.readAndWriteUnsafe().use { cursor ->
            cursor.resizeBuffer(newSize)
          }
        } else {
          // Same as adding EMPTY_DEFLATE_BLOCK and then removing 4 bytes.
          deflatedBytes.writeByte(0x00)
        }
    
        buffer.write(deflatedBytes, deflatedBytes.size)
      }
    
    Plain Text
    - Registered: Fri May 03 11:42:14 GMT 2024
    - Last Modified: Mon Jan 08 01:13:22 GMT 2024
    - 2.1K bytes
    - Viewed (0)
Back to top