Lines Matching refs:input
2453 # - A single output character can correspond to many bytes of input.
2454 # - The number of input bytes to complete the character can be
2455 # undetermined until the last input byte is received.
2456 # - The number of input bytes can vary depending on previous input.
2457 # - A single input byte can correspond to many characters of output.
2459 # last input byte is received.
2460 # - The number of output characters can vary depending on previous input.
2467 by input) or variable-length (period-terminated). In variable-length
2469 - 'i' followed by a number sets the input length, I (maximum 99).
2473 the output. The output word consists of the input word truncated
2476 I and O are initially set to 1. When I changes, any buffered input is
2502 def decode(self, input, final=False):
2504 for b in input:
2522 self.i = min(99, int(self.buffer[1:] or 0)) # set input length
2556 # I=1, O=1 (fixed-length input == fixed-length output)
2558 # I=0, O=0 (variable-length input, variable-length output)
2562 # I=0, O=6 (variable-length input, fixed-length output)
2564 # I=2, O=6 (fixed-length input < fixed-length output)
2566 # I=6, O=3 (fixed-length input > fixed-length output)
2584 for input, eof, output in self.test_cases:
2586 self.assertEqual(d.decode(input, eof), output)
3060 for input, _, _ in StatefulIncrementalDecoderTest.test_cases:
3061 test_seek_and_tell_with_data(input)
3064 for input, _, _ in StatefulIncrementalDecoderTest.test_cases:
3065 offset = CHUNK_SIZE - len(input)//2
3069 test_seek_and_tell_with_data(prefix + input, min_pos)
3886 input = "abc"
3889 input = encoder.encode(input)
3890 self.assertEqual(decoder.decode(input), "abc")
3895 # None meaning the IncrementalNewlineDecoder takes unicode input
3896 # rather than bytes input