Lines Matching +full:input +full:-
7 * http://www.apache.org/licenses/LICENSE-2.0
19 encode(input?: string): Uint8Array;
28 decode(input?: ArrayBuffer | null | Uint8Array, options?: WithStreamOption): string;
42 public static stringLength(input: string): int32 {
44 for (let i = 0; i < input.length; i++) {
46 let cp = input.codePointAt(i)!;
54 encodedLength(input: string): int32 {
56 for (let i = 0; i < input.length; i++) {
57 let cp = input.codePointAt(i)!;
84 // [s0][s1][s2][s3] [c_0] ... [c_size-1]
85 encode(input: string | undefined, addLength: boolean = true): Uint8Array {
88 if (!input) {
91 result = this.encoder!.encode('s'.repeat(headerLen) + input);
93 let length = this.encodedLength(input);
95 this.encodeInto(input, result, headerLen);
98 this.addLength(result, 0, result.length - headerLen);
125 encodeInto(input: string, result: Uint8Array, position: int32): Uint8Array {
127 this.encoder!.encodeInto(input, result.subarray(position, result.length));
131 for (let stringPosition = 0; stringPosition < input.length; stringPosition++) {
132 let cp = input.codePointAt(stringPosition)!;
167 decode(input: Uint8Array): string {
169 return this.decoder!.decode(input);
171 const cpSize = Math.min(CustomTextDecoder.cpArrayMaxSize, input.length);
176 while (index < input.length) {
177 let elem = input[index];
185 value = ((elem << 6) & 0x7ff) + (input[index + 1] & 0x3f);
188 … value = ((elem << 12) & 0xffff) + ((input[index + 1] << 6) & 0xfff) + (input[index + 2] & 0x3f);
193 ((input[index + 1] << 12) & 0x3ffff) +
194 ((input[index + 2] << 6) & 0xfff) +
195 (input[index + 3] & 0x3f);