@@ -224,13 +224,6 @@ boolean searchEscape(EscapeScanner.State state) throws IOException {
224
224
}
225
225
226
226
void encodeBasic (ByteList src ) throws IOException {
227
- // EscapeScanner.State state = new EscapeScanner.State();
228
- // state.ptrBytes = src.unsafeBytes();
229
- // state.ptr = src.begin();
230
- // state.len = src.realSize();
231
- // state.beg = 0;
232
- // state.pos = 0;
233
-
234
227
byte [] hexdig = HEX ;
235
228
byte [] scratch = aux ;
236
229
@@ -307,44 +300,6 @@ void encode(ByteList src) throws IOException {
307
300
}
308
301
}
309
302
310
- // while (state.pos < state.len) {
311
- // int ch = Byte.toUnsignedInt(state.ptrBytes[state.ptr + state.pos]);
312
- // int ch_len = escapeTable[ch];
313
- // /* JSON encoding */
314
-
315
- // if (ch_len > 0) {
316
- // switch (ch_len) {
317
- // case 9: {
318
- // state.beg = state.pos = flushPos(state.pos, state.beg, state.ptrBytes, state.ptr, 1);
319
- // escapeAscii(ch, scratch, hexdig);
320
- // break;
321
- // }
322
- // case 11: {
323
- // int b2 = Byte.toUnsignedInt(state.ptrBytes[state.ptr + state.pos + 1]);
324
- // if (b2 == 0x80) {
325
- // int b3 = Byte.toUnsignedInt(state.ptrBytes[state.ptr + state.pos + 2]);
326
- // if (b3 == 0xA8) {
327
- // state.beg = state.pos = flushPos(state.pos, state.beg, state.ptrBytes, state.ptr, 3);
328
- // append(BACKSLASH_U2028, 0, 6);
329
- // break;
330
- // } else if (b3 == 0xA9) {
331
- // state.beg = state.pos = flushPos(state.pos, state.beg, state.ptrBytes, state.ptr, 3);
332
- // append(BACKSLASH_U2029, 0, 6);
333
- // break;
334
- // }
335
- // }
336
- // ch_len = 3;
337
- // // fallthrough
338
- // }
339
- // default:
340
- // state.pos += ch_len;
341
- // break;
342
- // }
343
- // } else {
344
- // state.pos++;
345
- // }
346
- // }
347
-
348
303
if (state .beg < state .len ) {
349
304
append (state .ptrBytes , state .ptr + state .beg , state .len - state .beg );
350
305
}
0 commit comments