Lines Matching refs:data
2 ** Routines to represent binary data in ASCII and vice-versa
7 ** First char encodes (binary) length, rest data
12 ** short binary data is zero-extended (so the bits are always in the
18 ** Short binary data is filled (in ASCII) with '='.
20 ** File starts with introductory text, real data starts and ends
24 ** The binary data is run-length encoded, and then ascii-fied:
28 ** Short binary data results in the runt ascii-byte being output with
34 ** Programs that encode binary data in ASCII are written in
49 ** of the character. It also specifies some other behavior to enable 8bit data
207 data: ascii_buffer
210 Decode a line of uuencoded data.
214 binascii_a2b_uu_impl(PyObject *module, Py_buffer *data)
226 ascii_data = data->buf;
227 ascii_len = data->len;
231 /* First byte: binary data length (in bytes) */
241 /* XXX is it really best to add NULs if there's no more data */
303 data: Py_buffer
308 Uuencode line of data.
312 binascii_b2a_uu_impl(PyObject *module, Py_buffer *data, int backtick)
325 bin_data = data->buf;
326 bin_len = data->len;
350 /* Shift the data (or padding) into our buffer */
375 data: ascii_buffer
380 Decode a line of base64 data.
384 The same applies to excess data after padding (= / ==).
388 binascii_a2b_base64_impl(PyObject *module, Py_buffer *data, int strict_mode)
391 assert(data->len >= 0);
393 const unsigned char *ascii_data = data->buf;
394 size_t ascii_len = data->len;
429 ** We've already interpreted the data from the quad at this point.
430 ** in strict mode, an error should raise if there's excess data after the padding.
435 PyErr_SetString(state->Error, "Excess data after padding");
450 PyErr_SetString(state->Error, "Only base64 data is allowed");
502 "number of data characters (%zd) cannot be 1 more "
521 data: Py_buffer
526 Base64-code line of data.
530 binascii_b2a_base64_impl(PyObject *module, Py_buffer *data, int newline)
542 bin_data = data->buf;
543 bin_len = data->len;
553 PyErr_SetString(state->Error, "Too much data for base64 line");
568 /* Shift the data into our buffer */
597 data: Py_buffer
605 binascii_crc_hqx_impl(PyObject *module, Py_buffer *data, unsigned int crc)
612 bin_data = data->buf;
613 len = data->len;
667 tions for all combinations of data and CRC register values.
760 data: Py_buffer
768 binascii_crc32_impl(PyObject *module, Py_buffer *data, unsigned int crc)
777 if (data->len > 1024*5) {
778 unsigned char *buf = data->buf;
779 Py_ssize_t len = data->len;
792 crc = crc32(crc, data->buf, (unsigned int)data->len);
798 const unsigned char *bin_data = data->buf;
799 Py_ssize_t len = data->len;
818 data: Py_buffer
825 Hexadecimal representation of binary data.
840 binascii_b2a_hex_impl(PyObject *module, Py_buffer *data, PyObject *sep,
844 return _Py_strhex_bytes_with_sep((const char *)data->buf, data->len,
851 Hexadecimal representation of binary data.
858 binascii_hexlify_impl(PyObject *module, Py_buffer *data, PyObject *sep,
862 return _Py_strhex_bytes_with_sep((const char *)data->buf, data->len,
872 Binary data of hexadecimal representation.
936 Binary data of hexadecimal representation.
954 data: ascii_buffer
957 Decode a string of qp-encoded data.
961 binascii_a2b_qp_impl(PyObject *module, Py_buffer *data, int header)
971 ascii_data = data->buf;
972 datalen = data->len;
1053 data: Py_buffer
1066 binascii_b2a_qp_impl(PyObject *module, Py_buffer *data, int quotetabs,
1080 databuf = data->buf;
1081 datalen = data->len;
1263 PyDoc_STRVAR(doc_binascii, "Conversion between binary data and ASCII");