Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 4 of 4 for codepointDelta (0.11 sec)

  1. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappedRange.kt

        override val rangeStart: Int,
        val codepointDelta: Int,
      ) : MappedRange {
        private val absoluteDelta = abs(codepointDelta)
    
        val b1: Int
          get() =
            when {
              codepointDelta < 0 -> 0x40 or (absoluteDelta shr 14)
              codepointDelta > 0 -> 0x50 or (absoluteDelta shr 14)
              else -> error("Unexpected codepointDelta of 0")
            }
    
        val b2: Int
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.5K bytes
    - Viewed (0)
  2. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

        val mappedCodePoints = mapping.mappedTo.utf8().codePoints().toList()
        if (mappedCodePoints.size == 1) {
          val codePointDelta = mappedCodePoints.single() - sourceCodePoint
          if (MappedRange.InlineDelta.MAX_VALUE >= abs(codePointDelta)) {
            return MappedRange.InlineDelta(mapping.rangeStart, codePointDelta)
          }
        }
      }
      return null
    }
    
    /**
     * Inputs must have applied [withoutSectionSpans].
     */
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  3. okhttp/src/main/kotlin/okhttp3/internal/idn/IdnaMappingTable.kt

            val b3 = ranges[rangesIndex + 3].code
    
            val codepointDelta = (b1 and 0xF shl 14) or (b2 shl 7) or b3
            sink.writeUtf8CodePoint(codePoint - codepointDelta)
          }
          in 80..95 -> {
            // Mapped inline as codePoint delta to add
            val b2 = ranges[rangesIndex + 2].code
            val b3 = ranges[rangesIndex + 3].code
    
            val codepointDelta = (b1 and 0xF shl 14) or (b2 shl 7) or b3
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Tue Apr 02 11:39:58 UTC 2024
    - 9K bytes
    - Viewed (0)
  4. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

              sourceCodePoint1 = 0,
              mappedToCodePoints = listOf((1 shl 18) - 1),
            ),
          ),
        ).isEqualTo(
          InlineDelta(
            rangeStart = 0,
            codepointDelta = InlineDelta.MAX_VALUE,
          ),
        )
    
        assertThat(
          inlineDeltaOrNull(
            mappingOf(
              sourceCodePoint0 = 0,
              sourceCodePoint1 = 0,
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.3K bytes
    - Viewed (0)
Back to top