Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 3 of 3 for InlineDelta (0.1 sec)

  1. okhttp-idna-mapping-table/src/test/kotlin/okhttp3/internal/idn/MappingTablesTest.kt

        assertThat(
          mergeAdjacentDeltaMappedRanges(
            mutableListOf(
              InlineDelta(1, 5),
              InlineDelta(2, 5),
              InlineDelta(3, 1),
            ),
          ),
        ).containsExactly(
          InlineDelta(1, 5),
          InlineDelta(3, 1),
        )
      }
    
      @Test fun inlineDeltaOrNullValid() {
        assertThat(
          inlineDeltaOrNull(
            mappingOf(
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 6.3K bytes
    - Viewed (0)
  2. okhttp-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappingTables.kt

      )
    }
    
    /**
     * If [mapping] qualifies to be encoded as [MappedRange.InlineDelta] return new instance, otherwise null.
     * An [MappedRange.InlineDelta] must be a mapping from a single code-point to a single code-point with a difference
     * that can be represented in 2^18-1.
     */
    internal fun inlineDeltaOrNull(mapping: Mapping): MappedRange.InlineDelta? {
      if (mapping.hasSingleSourceCodePoint) {
    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-idna-mapping-table/src/main/kotlin/okhttp3/internal/idn/MappedRange.kt

              b2bit8 -> 125
              else -> 124
            }
          }
    
        val b2: Int
          get() = mappedTo[0] and 0x7f
    
        val b3: Int
          get() = mappedTo[1] and 0x7f
      }
    
      data class InlineDelta(
        override val rangeStart: Int,
        val codepointDelta: Int,
      ) : MappedRange {
        private val absoluteDelta = abs(codepointDelta)
    
        val b1: Int
          get() =
            when {
    Registered: Fri Nov 01 11:42:11 UTC 2024
    - Last Modified: Mon Jan 08 01:13:22 UTC 2024
    - 2.5K bytes
    - Viewed (0)
Back to top