Generated by Cython 0.15.1+ on Fri Dec 9 12:19:09 2011
Raw output: byte_offset.c
1: """
/* "byte_offset.pyx":1 * """ #<<<<<<<<<<<<<<* Authors: Jerome Kieffer, ESRF * Email: jerome.kieffer@esrf.eu */ __pyx_t_1 = PyDict_New(); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_1)); if (PyObject_SetAttr(__pyx_m, __pyx_n_s____test__, ((PyObject *)__pyx_t_1))<0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 1; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(((PyObject *)__pyx_t_1)); __pyx_t_1 = 0;
2: Authors: Jerome Kieffer, ESRF
3: Email: jerome.kieffer@esrf.eu
4:
5: Cif Binary Files images are 2D images written by the Pilatus detector and others.
6: They use a modified (simplified) byte-offset algorithm. This file contains the
7: decompression function from a string to an int64 numpy array.
8:
9: This is Cython: convert it to pure C then compile it with gcc
10: $ cython byte_offset.pyx
11:
12: """
13:
14: __author__ = "Jérôme Kieffer"
/* "byte_offset.pyx":14 * """ * * __author__ = "Jrme Kieffer" #<<<<<<<<<<<<<<* __contact__ = "jerome.kieffer@esrf.eu" * __license__ = "GPLv3+" */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____author__, ((PyObject *)__pyx_kp_s_14))<0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 14; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
15: __contact__ = "jerome.kieffer@esrf.eu"
/* "byte_offset.pyx":15 * * __author__ = "Jrme Kieffer" * __contact__ = "jerome.kieffer@esrf.eu" #<<<<<<<<<<<<<<* __license__ = "GPLv3+" * __copyright__ = "2010, European Synchrotron Radiation Facility, Grenoble, France" */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____contact__, ((PyObject *)__pyx_kp_s_15))<0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 15; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
16: __license__ = "GPLv3+"
/* "byte_offset.pyx":16 * __author__ = "Jrme Kieffer" * __contact__ = "jerome.kieffer@esrf.eu" * __license__ = "GPLv3+" #<<<<<<<<<<<<<<* __copyright__ = "2010, European Synchrotron Radiation Facility, Grenoble, France" * */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____license__, ((PyObject *)__pyx_kp_s_16))<0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 16; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
17: __copyright__ = "2010, European Synchrotron Radiation Facility, Grenoble, France"
/* "byte_offset.pyx":17 * __contact__ = "jerome.kieffer@esrf.eu" * __license__ = "GPLv3+" * __copyright__ = "2010, European Synchrotron Radiation Facility, Grenoble, France" #<<<<<<<<<<<<<<* * */ if (PyObject_SetAttr(__pyx_m, __pyx_n_s____copyright__, ((PyObject *)__pyx_kp_s_17))<0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 17; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
18:
19:
20: cimport numpy
21: import numpy
/* "byte_offset.pyx":21 * * cimport numpy * import numpy #<<<<<<<<<<<<<<* import cython * */ __pyx_t_1 = __Pyx_Import(((PyObject *)__pyx_n_s__numpy), 0, -1); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__numpy, __pyx_t_1)<0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 21; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
22: import cython
23:
24: @cython.boundscheck(False)
25: def analyseCython(bytes stream not None, size=None):
/* "byte_offset.pyx":25 * * @cython.boundscheck(False) * def analyseCython(bytes stream not None, size=None): #<<<<<<<<<<<<<<* """ * Analyze a stream of char with any length of exception (2,4, or 8 bytes integers) */ static PyObject *__pyx_pf_11byte_offset_analyseCython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds); /*proto*/ static char __pyx_doc_11byte_offset_analyseCython[] = "\n Analyze a stream of char with any length of exception (2,4, or 8 bytes integers)\n @param stream: string representing the compressed data\n @param size: the size of the output array (of longInts)\n @return : int64 ndArrays \n "; static PyMethodDef __pyx_mdef_11byte_offset_analyseCython = {__Pyx_NAMESTR("analyseCython"), (PyCFunction)__pyx_pf_11byte_offset_analyseCython, METH_VARARGS|METH_KEYWORDS, __Pyx_DOCSTR(__pyx_doc_11byte_offset_analyseCython)}; static PyObject *__pyx_pf_11byte_offset_analyseCython(PyObject *__pyx_self, PyObject *__pyx_args, PyObject *__pyx_kwds) { PyObject *__pyx_v_stream = 0; PyObject *__pyx_v_size = 0; int __pyx_v_i; int __pyx_v_j; PY_LONG_LONG __pyx_v_last; PY_LONG_LONG __pyx_v_current; char __pyx_v_tmp8; unsigned char __pyx_v_utmp8a; unsigned char __pyx_v_utmp8b; unsigned char __pyx_v_utmp8c; unsigned char __pyx_v_utmp8d; unsigned char __pyx_v_utmp8e; unsigned char __pyx_v_utmp8f; unsigned char __pyx_v_utmp8g; PY_LONG_LONG __pyx_v_tmp64; PY_LONG_LONG __pyx_v_tmp64a; PY_LONG_LONG __pyx_v_tmp64b; PY_LONG_LONG __pyx_v_tmp64c; PY_LONG_LONG __pyx_v_tmp64d; PY_LONG_LONG __pyx_v_tmp64e; PY_LONG_LONG __pyx_v_tmp64f; PY_LONG_LONG __pyx_v_tmp64g; char __pyx_v_key8; char __pyx_v_key0; int __pyx_v_csize; int __pyx_v_lenStream; char *__pyx_v_cstream; PyArrayObject *__pyx_v_dataOut = 0; __Pyx_LocalBuf_ND __pyx_pybuffernd_dataOut; __Pyx_Buffer __pyx_pybuffer_dataOut; PyObject *__pyx_r = NULL; static PyObject **__pyx_pyargnames[] = {&__pyx_n_s__stream,&__pyx_n_s__size,0}; __Pyx_RefNannyDeclarations __Pyx_RefNannySetupContext("analyseCython"); __pyx_self = __pyx_self; { PyObject* values[2] = {0,0}; values[1] = ((PyObject *)Py_None); if (unlikely(__pyx_kwds)) { Py_ssize_t kw_args; const Py_ssize_t pos_args = PyTuple_GET_SIZE(__pyx_args); switch (pos_args) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); case 0: break; default: goto __pyx_L5_argtuple_error; } kw_args = PyDict_Size(__pyx_kwds); switch (pos_args) { case 0: values[0] = PyDict_GetItem(__pyx_kwds, __pyx_n_s__stream); if (likely(values[0])) kw_args--; else goto __pyx_L5_argtuple_error; case 1: if (kw_args > 0) { PyObject* value = PyDict_GetItem(__pyx_kwds, __pyx_n_s__size); if (value) { values[1] = value; kw_args--; } } } if (unlikely(kw_args > 0)) { if (unlikely(__Pyx_ParseOptionalKeywords(__pyx_kwds, __pyx_pyargnames, 0, values, pos_args, "analyseCython")<0)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L3_error;} } __pyx_v_stream = ((PyObject*)values[0]); __pyx_v_size = values[1]; } else { switch (PyTuple_GET_SIZE(__pyx_args)) { case 2: values[1] = PyTuple_GET_ITEM(__pyx_args, 1); case 1: values[0] = PyTuple_GET_ITEM(__pyx_args, 0); break; default: goto __pyx_L5_argtuple_error; } } __pyx_v_stream = ((PyObject*)values[0]); __pyx_v_size = values[1]; } goto __pyx_L4_argument_unpacking_done; __pyx_L5_argtuple_error:; __Pyx_RaiseArgtupleInvalid("analyseCython", 0, 1, 2, PyTuple_GET_SIZE(__pyx_args)); {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L3_error;} __pyx_L3_error:; __Pyx_AddTraceback("byte_offset.analyseCython", __pyx_clineno, __pyx_lineno, __pyx_filename); __Pyx_RefNannyFinishContext(); return NULL; __pyx_L4_argument_unpacking_done:; __pyx_pybuffer_dataOut.pybuffer.buf = NULL; __pyx_pybuffer_dataOut.refcount = 0; __pyx_pybuffernd_dataOut.data = NULL; __pyx_pybuffernd_dataOut.rcbuffer = &__pyx_pybuffer_dataOut; if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_stream), (&PyBytes_Type), 0, "stream", 1))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} /* "byte_offset.pyx":25 * * @cython.boundscheck(False) * def analyseCython(bytes stream not None, size=None): #<<<<<<<<<<<<<<* """ * Analyze a stream of char with any length of exception (2,4, or 8 bytes integers) */ __pyx_k_tuple_18 = PyTuple_New(28); if (unlikely(!__pyx_k_tuple_18)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_k_tuple_18); __Pyx_INCREF(((PyObject *)__pyx_n_s__stream)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 0, ((PyObject *)__pyx_n_s__stream)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__stream)); __Pyx_INCREF(((PyObject *)__pyx_n_s__size)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 1, ((PyObject *)__pyx_n_s__size)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__size)); __Pyx_INCREF(((PyObject *)__pyx_n_s__i)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 2, ((PyObject *)__pyx_n_s__i)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__i)); __Pyx_INCREF(((PyObject *)__pyx_n_s__j)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 3, ((PyObject *)__pyx_n_s__j)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__j)); __Pyx_INCREF(((PyObject *)__pyx_n_s__last)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 4, ((PyObject *)__pyx_n_s__last)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__last)); __Pyx_INCREF(((PyObject *)__pyx_n_s__current)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 5, ((PyObject *)__pyx_n_s__current)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__current)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp8)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 6, ((PyObject *)__pyx_n_s__tmp8)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp8)); __Pyx_INCREF(((PyObject *)__pyx_n_s__utmp8a)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 7, ((PyObject *)__pyx_n_s__utmp8a)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utmp8a)); __Pyx_INCREF(((PyObject *)__pyx_n_s__utmp8b)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 8, ((PyObject *)__pyx_n_s__utmp8b)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utmp8b)); __Pyx_INCREF(((PyObject *)__pyx_n_s__utmp8c)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 9, ((PyObject *)__pyx_n_s__utmp8c)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utmp8c)); __Pyx_INCREF(((PyObject *)__pyx_n_s__utmp8d)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 10, ((PyObject *)__pyx_n_s__utmp8d)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utmp8d)); __Pyx_INCREF(((PyObject *)__pyx_n_s__utmp8e)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 11, ((PyObject *)__pyx_n_s__utmp8e)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utmp8e)); __Pyx_INCREF(((PyObject *)__pyx_n_s__utmp8f)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 12, ((PyObject *)__pyx_n_s__utmp8f)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utmp8f)); __Pyx_INCREF(((PyObject *)__pyx_n_s__utmp8g)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 13, ((PyObject *)__pyx_n_s__utmp8g)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__utmp8g)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp64)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 14, ((PyObject *)__pyx_n_s__tmp64)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp64)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp64a)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 15, ((PyObject *)__pyx_n_s__tmp64a)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp64a)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp64b)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 16, ((PyObject *)__pyx_n_s__tmp64b)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp64b)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp64c)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 17, ((PyObject *)__pyx_n_s__tmp64c)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp64c)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp64d)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 18, ((PyObject *)__pyx_n_s__tmp64d)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp64d)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp64e)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 19, ((PyObject *)__pyx_n_s__tmp64e)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp64e)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp64f)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 20, ((PyObject *)__pyx_n_s__tmp64f)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp64f)); __Pyx_INCREF(((PyObject *)__pyx_n_s__tmp64g)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 21, ((PyObject *)__pyx_n_s__tmp64g)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__tmp64g)); __Pyx_INCREF(((PyObject *)__pyx_n_s__key8)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 22, ((PyObject *)__pyx_n_s__key8)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key8)); __Pyx_INCREF(((PyObject *)__pyx_n_s__key0)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 23, ((PyObject *)__pyx_n_s__key0)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__key0)); __Pyx_INCREF(((PyObject *)__pyx_n_s__csize)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 24, ((PyObject *)__pyx_n_s__csize)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__csize)); __Pyx_INCREF(((PyObject *)__pyx_n_s__lenStream)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 25, ((PyObject *)__pyx_n_s__lenStream)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__lenStream)); __Pyx_INCREF(((PyObject *)__pyx_n_s__cstream)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 26, ((PyObject *)__pyx_n_s__cstream)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__cstream)); __Pyx_INCREF(((PyObject *)__pyx_n_s__dataOut)); PyTuple_SET_ITEM(__pyx_k_tuple_18, 27, ((PyObject *)__pyx_n_s__dataOut)); __Pyx_GIVEREF(((PyObject *)__pyx_n_s__dataOut)); __Pyx_GIVEREF(((PyObject *)__pyx_k_tuple_18)); /* "byte_offset.pyx":25 * * @cython.boundscheck(False) * def analyseCython(bytes stream not None, size=None): #<<<<<<<<<<<<<<* """ * Analyze a stream of char with any length of exception (2,4, or 8 bytes integers) */ __pyx_t_1 = PyCFunction_NewEx(&__pyx_mdef_11byte_offset_analyseCython, NULL, __pyx_n_s__byte_offset); if (unlikely(!__pyx_t_1)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_1); if (PyObject_SetAttr(__pyx_m, __pyx_n_s__analyseCython, __pyx_t_1)<0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 25; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
26: """
27: Analyze a stream of char with any length of exception (2,4, or 8 bytes integers)
28: @param stream: string representing the compressed data
29: @param size: the size of the output array (of longInts)
30: @return : int64 ndArrays
31: """
32:
33: cdef int i = 0
/* "byte_offset.pyx":33 * """ * * cdef int i = 0 #<<<<<<<<<<<<<<* cdef int j = 0 * cdef long long last = 0 */ __pyx_v_i = 0;
34: cdef int j = 0
/* "byte_offset.pyx":34 * * cdef int i = 0 * cdef int j = 0 #<<<<<<<<<<<<<<* cdef long long last = 0 * cdef long long current = 0 */ __pyx_v_j = 0;
35: cdef long long last = 0
/* "byte_offset.pyx":35 * cdef int i = 0 * cdef int j = 0 * cdef long long last = 0 #<<<<<<<<<<<<<<* cdef long long current = 0 * cdef char tmp8 = 0 */ __pyx_v_last = 0;
36: cdef long long current = 0
/* "byte_offset.pyx":36 * cdef int j = 0 * cdef long long last = 0 * cdef long long current = 0 #<<<<<<<<<<<<<<* cdef char tmp8 = 0 * */ __pyx_v_current = 0;
37: cdef char tmp8 = 0
/* "byte_offset.pyx":37 * cdef long long last = 0 * cdef long long current = 0 * cdef char tmp8 = 0 #<<<<<<<<<<<<<<* * cdef unsigned char utmp8a = 0 */ __pyx_v_tmp8 = 0;
38:
39: cdef unsigned char utmp8a = 0
/* "byte_offset.pyx":39 * cdef char tmp8 = 0 * * cdef unsigned char utmp8a = 0 #<<<<<<<<<<<<<<* cdef unsigned char utmp8b = 0 * cdef unsigned char utmp8c = 0 */ __pyx_v_utmp8a = 0;
40: cdef unsigned char utmp8b = 0
/* "byte_offset.pyx":40 * * cdef unsigned char utmp8a = 0 * cdef unsigned char utmp8b = 0 #<<<<<<<<<<<<<<* cdef unsigned char utmp8c = 0 * cdef unsigned char utmp8d = 0 */ __pyx_v_utmp8b = 0;
41: cdef unsigned char utmp8c = 0
/* "byte_offset.pyx":41 * cdef unsigned char utmp8a = 0 * cdef unsigned char utmp8b = 0 * cdef unsigned char utmp8c = 0 #<<<<<<<<<<<<<<* cdef unsigned char utmp8d = 0 * cdef unsigned char utmp8e = 0 */ __pyx_v_utmp8c = 0;
42: cdef unsigned char utmp8d = 0
/* "byte_offset.pyx":42 * cdef unsigned char utmp8b = 0 * cdef unsigned char utmp8c = 0 * cdef unsigned char utmp8d = 0 #<<<<<<<<<<<<<<* cdef unsigned char utmp8e = 0 * cdef unsigned char utmp8f = 0 */ __pyx_v_utmp8d = 0;
43: cdef unsigned char utmp8e = 0
/* "byte_offset.pyx":43 * cdef unsigned char utmp8c = 0 * cdef unsigned char utmp8d = 0 * cdef unsigned char utmp8e = 0 #<<<<<<<<<<<<<<* cdef unsigned char utmp8f = 0 * cdef unsigned char utmp8g = 0 */ __pyx_v_utmp8e = 0;
44: cdef unsigned char utmp8f = 0
/* "byte_offset.pyx":44 * cdef unsigned char utmp8d = 0 * cdef unsigned char utmp8e = 0 * cdef unsigned char utmp8f = 0 #<<<<<<<<<<<<<<* cdef unsigned char utmp8g = 0 * */ __pyx_v_utmp8f = 0;
45: cdef unsigned char utmp8g = 0
/* "byte_offset.pyx":45 * cdef unsigned char utmp8e = 0 * cdef unsigned char utmp8f = 0 * cdef unsigned char utmp8g = 0 #<<<<<<<<<<<<<<* * cdef long long tmp64 = 0 */ __pyx_v_utmp8g = 0;
46:
47: cdef long long tmp64 = 0
/* "byte_offset.pyx":47 * cdef unsigned char utmp8g = 0 * * cdef long long tmp64 = 0 #<<<<<<<<<<<<<<* cdef long long tmp64a = 0 * cdef long long tmp64b = 0 */ __pyx_v_tmp64 = 0;
48: cdef long long tmp64a = 0
/* "byte_offset.pyx":48 * * cdef long long tmp64 = 0 * cdef long long tmp64a = 0 #<<<<<<<<<<<<<<* cdef long long tmp64b = 0 * cdef long long tmp64c = 0 */ __pyx_v_tmp64a = 0;
49: cdef long long tmp64b = 0
/* "byte_offset.pyx":49 * cdef long long tmp64 = 0 * cdef long long tmp64a = 0 * cdef long long tmp64b = 0 #<<<<<<<<<<<<<<* cdef long long tmp64c = 0 * cdef long long tmp64d = 0 */ __pyx_v_tmp64b = 0;
50: cdef long long tmp64c = 0
/* "byte_offset.pyx":50 * cdef long long tmp64a = 0 * cdef long long tmp64b = 0 * cdef long long tmp64c = 0 #<<<<<<<<<<<<<<* cdef long long tmp64d = 0 * cdef long long tmp64e = 0 */ __pyx_v_tmp64c = 0;
51: cdef long long tmp64d = 0
/* "byte_offset.pyx":51 * cdef long long tmp64b = 0 * cdef long long tmp64c = 0 * cdef long long tmp64d = 0 #<<<<<<<<<<<<<<* cdef long long tmp64e = 0 * cdef long long tmp64f = 0 */ __pyx_v_tmp64d = 0;
52: cdef long long tmp64e = 0
/* "byte_offset.pyx":52 * cdef long long tmp64c = 0 * cdef long long tmp64d = 0 * cdef long long tmp64e = 0 #<<<<<<<<<<<<<<* cdef long long tmp64f = 0 * cdef long long tmp64g = 0 */ __pyx_v_tmp64e = 0;
53: cdef long long tmp64f = 0
/* "byte_offset.pyx":53 * cdef long long tmp64d = 0 * cdef long long tmp64e = 0 * cdef long long tmp64f = 0 #<<<<<<<<<<<<<<* cdef long long tmp64g = 0 * */ __pyx_v_tmp64f = 0;
54: cdef long long tmp64g = 0
/* "byte_offset.pyx":54 * cdef long long tmp64e = 0 * cdef long long tmp64f = 0 * cdef long long tmp64g = 0 #<<<<<<<<<<<<<<* * cdef char key8 = 0x80 */ __pyx_v_tmp64g = 0;
55:
56: cdef char key8 = 0x80
/* "byte_offset.pyx":56 * cdef long long tmp64g = 0 * * cdef char key8 = 0x80 #<<<<<<<<<<<<<<* cdef char key0 = 0x00 * */ __pyx_v_key8 = 0x80;
57: cdef char key0 = 0x00
/* "byte_offset.pyx":57 * * cdef char key8 = 0x80 * cdef char key0 = 0x00 #<<<<<<<<<<<<<<* * cdef int csize */ __pyx_v_key0 = 0x00;
58:
59: cdef int csize
60: cdef int lenStream = < int > len(stream)
/* "byte_offset.pyx":60 * * cdef int csize * cdef int lenStream =<int > len(stream) #<<<<<<<<<<<<<<* cdef char * cstream = stream * if size is None: */ __pyx_t_1 = PyBytes_GET_SIZE(((PyObject *)__pyx_v_stream)); __pyx_v_lenStream = ((int)__pyx_t_1);
61: cdef char * cstream = stream
/* "byte_offset.pyx":61 * cdef int csize * cdef int lenStream =<int > len(stream) * cdef char * cstream = stream #<<<<<<<<<<<<<<* if size is None: * csize = lenStream */ __pyx_t_2 = PyBytes_AsString(((PyObject *)__pyx_v_stream)); if (unlikely((!__pyx_t_2) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 61; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_v_cstream = __pyx_t_2;
62: if size is None:
/* "byte_offset.pyx":62 * cdef int lenStream =<int > len(stream) * cdef char * cstream = stream * if size is None: #<<<<<<<<<<<<<<* csize = lenStream * else: */ __pyx_t_3 = (__pyx_v_size == Py_None); if (__pyx_t_3) {
63: csize = lenStream
/* "byte_offset.pyx":63
* cdef char * cstream = stream
* if size is None:
* csize = lenStream # <<<<<<<<<<<<<<
* else:
* csize = < int > size
*/
__pyx_v_csize = __pyx_v_lenStream;
goto __pyx_L6;
}
/*else*/ {
64: else:
65: csize = < int > size
/* "byte_offset.pyx":65
* csize = lenStream
* else:
* csize = < int > size # <<<<<<<<<<<<<<
* cdef numpy.ndarray[ long long , ndim = 1] dataOut = numpy.zeros(csize, dtype=numpy.int64)
* with nogil:
*/
__pyx_t_4 = __Pyx_PyInt_AsInt(__pyx_v_size); if (unlikely((__pyx_t_4 == (int)-1) && PyErr_Occurred())) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 65; __pyx_clineno = __LINE__; goto __pyx_L1_error;}
__pyx_v_csize = ((int)__pyx_t_4);
}
__pyx_L6:;
66: cdef numpy.ndarray[ long long , ndim = 1] dataOut = numpy.zeros(csize, dtype=numpy.int64)
/* "byte_offset.pyx":66 * else: * csize =<int > size * cdef numpy.ndarray[ long long , ndim = 1] dataOut = numpy.zeros(csize, dtype=numpy.int64) #<<<<<<<<<<<<<<* with nogil: * while (i<lenStream) and (j<csize): */ __pyx_t_5 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_6 = PyObject_GetAttr(__pyx_t_5, __pyx_n_s__zeros); if (unlikely(!__pyx_t_6)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_6); __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyInt_FromLong(__pyx_v_csize); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_5); __pyx_t_7 = PyTuple_New(1); if (unlikely(!__pyx_t_7)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_7); PyTuple_SET_ITEM(__pyx_t_7, 0, __pyx_t_5); __Pyx_GIVEREF(__pyx_t_5); __pyx_t_5 = 0; __pyx_t_5 = PyDict_New(); if (unlikely(!__pyx_t_5)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(((PyObject *)__pyx_t_5)); __pyx_t_8 = __Pyx_GetName(__pyx_m, __pyx_n_s__numpy); if (unlikely(!__pyx_t_8)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_8); __pyx_t_9 = PyObject_GetAttr(__pyx_t_8, __pyx_n_s__int64); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_8); __pyx_t_8 = 0; if (PyDict_SetItem(__pyx_t_5, ((PyObject *)__pyx_n_s__dtype), __pyx_t_9)<0) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_DECREF(__pyx_t_9); __pyx_t_9 = 0; __pyx_t_9 = PyObject_Call(__pyx_t_6, ((PyObject *)__pyx_t_7), ((PyObject *)__pyx_t_5)); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_7)); __pyx_t_7 = 0; __Pyx_DECREF(((PyObject *)__pyx_t_5)); __pyx_t_5 = 0; if (!(likely(((__pyx_t_9) == Py_None) || likely(__Pyx_TypeTest(__pyx_t_9, __pyx_ptype_5numpy_ndarray))))) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __pyx_t_10 = ((PyArrayObject *)__pyx_t_9); { __Pyx_BufFmt_StackElem __pyx_stack[1]; if (unlikely(__Pyx_GetBufferAndValidate(&__pyx_pybuffernd_dataOut.rcbuffer->pybuffer, (PyObject*)__pyx_t_10, &__Pyx_TypeInfo_PY_LONG_LONG, PyBUF_FORMAT| PyBUF_STRIDES| PyBUF_WRITABLE, 1, 0, __pyx_stack) == -1)) { __pyx_v_dataOut = ((PyArrayObject *)Py_None); __Pyx_INCREF(Py_None); __pyx_pybuffernd_dataOut.rcbuffer->pybuffer.buf = NULL; {__pyx_filename = __pyx_f[0]; __pyx_lineno = 66; __pyx_clineno = __LINE__; goto __pyx_L1_error;} } else {__pyx_pybuffernd_dataOut.diminfo[0].strides = __pyx_pybuffernd_dataOut.rcbuffer->pybuffer.strides[0]; __pyx_pybuffernd_dataOut.diminfo[0].shape = __pyx_pybuffernd_dataOut.rcbuffer->pybuffer.shape[0]; } } __pyx_t_10 = 0; __pyx_v_dataOut = ((PyArrayObject *)__pyx_t_9); __pyx_t_9 = 0;
67: with nogil:
/* "byte_offset.pyx":67 * csize =<int > size * cdef numpy.ndarray[ long long , ndim = 1] dataOut = numpy.zeros(csize, dtype=numpy.int64) * with nogil: #<<<<<<<<<<<<<<* while (i<lenStream) and (j<csize): * if (cstream[i] == key8): */ { #ifdef WITH_THREAD PyThreadState *_save = NULL; #endif Py_UNBLOCK_THREADS /*try:*/ { /* "byte_offset.pyx":67 * csize =<int > size * cdef numpy.ndarray[ long long , ndim = 1] dataOut = numpy.zeros(csize, dtype=numpy.int64) * with nogil: #<<<<<<<<<<<<<<* while (i<lenStream) and (j<csize): * if (cstream[i] == key8): */ /*finally:*/ { Py_BLOCK_THREADS } }
68: while (i < lenStream) and (j < csize):
/* "byte_offset.pyx":68
* cdef numpy.ndarray[ long long , ndim = 1] dataOut = numpy.zeros(csize, dtype=numpy.int64)
* with nogil:
* while (i < lenStream) and (j < csize): # <<<<<<<<<<<<<<
* if (cstream[i] == key8):
* if ((cstream[i + 1] == key0) and (cstream[i + 2] == key8)):
*/
while (1) {
__pyx_t_3 = (__pyx_v_i < __pyx_v_lenStream);
if (__pyx_t_3) {
__pyx_t_11 = (__pyx_v_j < __pyx_v_csize);
__pyx_t_12 = __pyx_t_11;
} else {
__pyx_t_12 = __pyx_t_3;
}
if (!__pyx_t_12) break;
69: if (cstream[i] == key8):
/* "byte_offset.pyx":69
* with nogil:
* while (i < lenStream) and (j < csize):
* if (cstream[i] == key8): # <<<<<<<<<<<<<<
* if ((cstream[i + 1] == key0) and (cstream[i + 2] == key8)):
* if (cstream[i + 3] == key0) and (cstream[i + 4] == key0) and (cstream[i + 5] == key0) and (cstream[i + 6] == key8):
*/
__pyx_t_12 = ((__pyx_v_cstream[__pyx_v_i]) == __pyx_v_key8);
if (__pyx_t_12) {
70: if ((cstream[i + 1] == key0) and (cstream[i + 2] == key8)):
/* "byte_offset.pyx":70
* while (i < lenStream) and (j < csize):
* if (cstream[i] == key8):
* if ((cstream[i + 1] == key0) and (cstream[i + 2] == key8)): # <<<<<<<<<<<<<<
* if (cstream[i + 3] == key0) and (cstream[i + 4] == key0) and (cstream[i + 5] == key0) and (cstream[i + 6] == key8):
* #Retrieve the interesting Bytes of data
*/
__pyx_t_12 = ((__pyx_v_cstream[(__pyx_v_i + 1)]) == __pyx_v_key0);
if (__pyx_t_12) {
__pyx_t_3 = ((__pyx_v_cstream[(__pyx_v_i + 2)]) == __pyx_v_key8);
__pyx_t_11 = __pyx_t_3;
} else {
__pyx_t_11 = __pyx_t_12;
}
if (__pyx_t_11) {
71: if (cstream[i + 3] == key0) and (cstream[i + 4] == key0) and (cstream[i + 5] == key0) and (cstream[i + 6] == key8):
/* "byte_offset.pyx":71
* if (cstream[i] == key8):
* if ((cstream[i + 1] == key0) and (cstream[i + 2] == key8)):
* if (cstream[i + 3] == key0) and (cstream[i + 4] == key0) and (cstream[i + 5] == key0) and (cstream[i + 6] == key8): # <<<<<<<<<<<<<<
* #Retrieve the interesting Bytes of data
* tmp8 = cstream[i + 14]
*/
__pyx_t_11 = ((__pyx_v_cstream[(__pyx_v_i + 3)]) == __pyx_v_key0);
if (__pyx_t_11) {
__pyx_t_12 = ((__pyx_v_cstream[(__pyx_v_i + 4)]) == __pyx_v_key0);
if (__pyx_t_12) {
__pyx_t_3 = ((__pyx_v_cstream[(__pyx_v_i + 5)]) == __pyx_v_key0);
if (__pyx_t_3) {
__pyx_t_13 = ((__pyx_v_cstream[(__pyx_v_i + 6)]) == __pyx_v_key8);
__pyx_t_14 = __pyx_t_13;
} else {
__pyx_t_14 = __pyx_t_3;
}
__pyx_t_3 = __pyx_t_14;
} else {
__pyx_t_3 = __pyx_t_12;
}
__pyx_t_12 = __pyx_t_3;
} else {
__pyx_t_12 = __pyx_t_11;
}
if (__pyx_t_12) {
72: #Retrieve the interesting Bytes of data
73: tmp8 = cstream[i + 14]
/* "byte_offset.pyx":73
* if (cstream[i + 3] == key0) and (cstream[i + 4] == key0) and (cstream[i + 5] == key0) and (cstream[i + 6] == key8):
* #Retrieve the interesting Bytes of data
* tmp8 = cstream[i + 14] # <<<<<<<<<<<<<<
* utmp8a = cstream[i + 13]
* utmp8b = cstream[i + 12]
*/
__pyx_v_tmp8 = (__pyx_v_cstream[(__pyx_v_i + 14)]);
74: utmp8a = cstream[i + 13]
/* "byte_offset.pyx":74
* #Retrieve the interesting Bytes of data
* tmp8 = cstream[i + 14]
* utmp8a = cstream[i + 13] # <<<<<<<<<<<<<<
* utmp8b = cstream[i + 12]
* utmp8c = cstream[i + 11]
*/
__pyx_v_utmp8a = (__pyx_v_cstream[(__pyx_v_i + 13)]);
75: utmp8b = cstream[i + 12]
/* "byte_offset.pyx":75
* tmp8 = cstream[i + 14]
* utmp8a = cstream[i + 13]
* utmp8b = cstream[i + 12] # <<<<<<<<<<<<<<
* utmp8c = cstream[i + 11]
* utmp8d = cstream[i + 10]
*/
__pyx_v_utmp8b = (__pyx_v_cstream[(__pyx_v_i + 12)]);
76: utmp8c = cstream[i + 11]
/* "byte_offset.pyx":76
* utmp8a = cstream[i + 13]
* utmp8b = cstream[i + 12]
* utmp8c = cstream[i + 11] # <<<<<<<<<<<<<<
* utmp8d = cstream[i + 10]
* utmp8e = cstream[i + 9]
*/
__pyx_v_utmp8c = (__pyx_v_cstream[(__pyx_v_i + 11)]);
77: utmp8d = cstream[i + 10]
/* "byte_offset.pyx":77
* utmp8b = cstream[i + 12]
* utmp8c = cstream[i + 11]
* utmp8d = cstream[i + 10] # <<<<<<<<<<<<<<
* utmp8e = cstream[i + 9]
* utmp8f = cstream[i + 8]
*/
__pyx_v_utmp8d = (__pyx_v_cstream[(__pyx_v_i + 10)]);
78: utmp8e = cstream[i + 9]
/* "byte_offset.pyx":78
* utmp8c = cstream[i + 11]
* utmp8d = cstream[i + 10]
* utmp8e = cstream[i + 9] # <<<<<<<<<<<<<<
* utmp8f = cstream[i + 8]
* utmp8g = cstream[i + 7]
*/
__pyx_v_utmp8e = (__pyx_v_cstream[(__pyx_v_i + 9)]);
79: utmp8f = cstream[i + 8]
/* "byte_offset.pyx":79
* utmp8d = cstream[i + 10]
* utmp8e = cstream[i + 9]
* utmp8f = cstream[i + 8] # <<<<<<<<<<<<<<
* utmp8g = cstream[i + 7]
* # cast them in 64 bit
*/
__pyx_v_utmp8f = (__pyx_v_cstream[(__pyx_v_i + 8)]);
80: utmp8g = cstream[i + 7]
/* "byte_offset.pyx":80
* utmp8e = cstream[i + 9]
* utmp8f = cstream[i + 8]
* utmp8g = cstream[i + 7] # <<<<<<<<<<<<<<
* # cast them in 64 bit
* tmp64 = tmp8
*/
__pyx_v_utmp8g = (__pyx_v_cstream[(__pyx_v_i + 7)]);
81: # cast them in 64 bit
82: tmp64 = tmp8
/* "byte_offset.pyx":82
* utmp8g = cstream[i + 7]
* # cast them in 64 bit
* tmp64 = tmp8 # <<<<<<<<<<<<<<
* tmp64a = utmp8a
* tmp64b = utmp8b
*/
__pyx_v_tmp64 = __pyx_v_tmp8;
83: tmp64a = utmp8a
/* "byte_offset.pyx":83
* # cast them in 64 bit
* tmp64 = tmp8
* tmp64a = utmp8a # <<<<<<<<<<<<<<
* tmp64b = utmp8b
* tmp64c = utmp8c
*/
__pyx_v_tmp64a = __pyx_v_utmp8a;
84: tmp64b = utmp8b
/* "byte_offset.pyx":84
* tmp64 = tmp8
* tmp64a = utmp8a
* tmp64b = utmp8b # <<<<<<<<<<<<<<
* tmp64c = utmp8c
* tmp64d = utmp8d
*/
__pyx_v_tmp64b = __pyx_v_utmp8b;
85: tmp64c = utmp8c
/* "byte_offset.pyx":85
* tmp64a = utmp8a
* tmp64b = utmp8b
* tmp64c = utmp8c # <<<<<<<<<<<<<<
* tmp64d = utmp8d
* tmp64e = utmp8e
*/
__pyx_v_tmp64c = __pyx_v_utmp8c;
86: tmp64d = utmp8d
/* "byte_offset.pyx":86
* tmp64b = utmp8b
* tmp64c = utmp8c
* tmp64d = utmp8d # <<<<<<<<<<<<<<
* tmp64e = utmp8e
* tmp64f = utmp8f
*/
__pyx_v_tmp64d = __pyx_v_utmp8d;
87: tmp64e = utmp8e
/* "byte_offset.pyx":87
* tmp64c = utmp8c
* tmp64d = utmp8d
* tmp64e = utmp8e # <<<<<<<<<<<<<<
* tmp64f = utmp8f
* tmp64g = utmp8g
*/
__pyx_v_tmp64e = __pyx_v_utmp8e;
88: tmp64f = utmp8f
/* "byte_offset.pyx":88
* tmp64d = utmp8d
* tmp64e = utmp8e
* tmp64f = utmp8f # <<<<<<<<<<<<<<
* tmp64g = utmp8g
* current = (tmp64 << 56) | (tmp64a << 48) | (tmp64b << 40) | (tmp64c << 32) | (tmp64d << 24) | (tmp64e << 16) | (tmp64f << 8) | (tmp64g)
*/
__pyx_v_tmp64f = __pyx_v_utmp8f;
89: tmp64g = utmp8g
/* "byte_offset.pyx":89
* tmp64e = utmp8e
* tmp64f = utmp8f
* tmp64g = utmp8g # <<<<<<<<<<<<<<
* current = (tmp64 << 56) | (tmp64a << 48) | (tmp64b << 40) | (tmp64c << 32) | (tmp64d << 24) | (tmp64e << 16) | (tmp64f << 8) | (tmp64g)
* i += 15
*/
__pyx_v_tmp64g = __pyx_v_utmp8g;
90: current = (tmp64 << 56) | (tmp64a << 48) | (tmp64b << 40) | (tmp64c << 32) | (tmp64d << 24) | (tmp64e << 16) | (tmp64f << 8) | (tmp64g)
/* "byte_offset.pyx":90
* tmp64f = utmp8f
* tmp64g = utmp8g
* current = (tmp64 << 56) | (tmp64a << 48) | (tmp64b << 40) | (tmp64c << 32) | (tmp64d << 24) | (tmp64e << 16) | (tmp64f << 8) | (tmp64g) # <<<<<<<<<<<<<<
* i += 15
* else:
*/
__pyx_v_current = ((((((((__pyx_v_tmp64 << 56) | (__pyx_v_tmp64a << 48)) | (__pyx_v_tmp64b << 40)) | (__pyx_v_tmp64c << 32)) | (__pyx_v_tmp64d << 24)) | (__pyx_v_tmp64e << 16)) | (__pyx_v_tmp64f << 8)) | __pyx_v_tmp64g);
91: i += 15
/* "byte_offset.pyx":91
* tmp64g = utmp8g
* current = (tmp64 << 56) | (tmp64a << 48) | (tmp64b << 40) | (tmp64c << 32) | (tmp64d << 24) | (tmp64e << 16) | (tmp64f << 8) | (tmp64g)
* i += 15 # <<<<<<<<<<<<<<
* else:
* #Retrieve the interesting Bytes of data
*/
__pyx_v_i = (__pyx_v_i + 15);
goto __pyx_L14;
}
/*else*/ {
92: else:
93: #Retrieve the interesting Bytes of data
94: tmp8 = cstream[i + 6]
/* "byte_offset.pyx":94
* else:
* #Retrieve the interesting Bytes of data
* tmp8 = cstream[i + 6] # <<<<<<<<<<<<<<
* utmp8a = cstream[i + 5]
* utmp8b = cstream[i + 4]
*/
__pyx_v_tmp8 = (__pyx_v_cstream[(__pyx_v_i + 6)]);
95: utmp8a = cstream[i + 5]
/* "byte_offset.pyx":95
* #Retrieve the interesting Bytes of data
* tmp8 = cstream[i + 6]
* utmp8a = cstream[i + 5] # <<<<<<<<<<<<<<
* utmp8b = cstream[i + 4]
* utmp8c = cstream[i + 3]
*/
__pyx_v_utmp8a = (__pyx_v_cstream[(__pyx_v_i + 5)]);
96: utmp8b = cstream[i + 4]
/* "byte_offset.pyx":96
* tmp8 = cstream[i + 6]
* utmp8a = cstream[i + 5]
* utmp8b = cstream[i + 4] # <<<<<<<<<<<<<<
* utmp8c = cstream[i + 3]
* # cast them in 64 bit
*/
__pyx_v_utmp8b = (__pyx_v_cstream[(__pyx_v_i + 4)]);
97: utmp8c = cstream[i + 3]
/* "byte_offset.pyx":97
* utmp8a = cstream[i + 5]
* utmp8b = cstream[i + 4]
* utmp8c = cstream[i + 3] # <<<<<<<<<<<<<<
* # cast them in 64 bit
* tmp64 = tmp8
*/
__pyx_v_utmp8c = (__pyx_v_cstream[(__pyx_v_i + 3)]);
98: # cast them in 64 bit
99: tmp64 = tmp8
/* "byte_offset.pyx":99
* utmp8c = cstream[i + 3]
* # cast them in 64 bit
* tmp64 = tmp8 # <<<<<<<<<<<<<<
* tmp64a = utmp8a
* tmp64b = utmp8b
*/
__pyx_v_tmp64 = __pyx_v_tmp8;
100: tmp64a = utmp8a
/* "byte_offset.pyx":100
* # cast them in 64 bit
* tmp64 = tmp8
* tmp64a = utmp8a # <<<<<<<<<<<<<<
* tmp64b = utmp8b
* tmp64c = utmp8c
*/
__pyx_v_tmp64a = __pyx_v_utmp8a;
101: tmp64b = utmp8b
/* "byte_offset.pyx":101
* tmp64 = tmp8
* tmp64a = utmp8a
* tmp64b = utmp8b # <<<<<<<<<<<<<<
* tmp64c = utmp8c
* #Assemble data into a long long
*/
__pyx_v_tmp64b = __pyx_v_utmp8b;
102: tmp64c = utmp8c
/* "byte_offset.pyx":102
* tmp64a = utmp8a
* tmp64b = utmp8b
* tmp64c = utmp8c # <<<<<<<<<<<<<<
* #Assemble data into a long long
* current = (tmp64 << 24) | (tmp64a << 16) | (tmp64b << 8) | (tmp64c);
*/
__pyx_v_tmp64c = __pyx_v_utmp8c;
103: #Assemble data into a long long
104: current = (tmp64 << 24) | (tmp64a << 16) | (tmp64b << 8) | (tmp64c);
/* "byte_offset.pyx":104
* tmp64c = utmp8c
* #Assemble data into a long long
* current = (tmp64 << 24) | (tmp64a << 16) | (tmp64b << 8) | (tmp64c); # <<<<<<<<<<<<<<
* i += 7
* else:
*/
__pyx_v_current = ((((__pyx_v_tmp64 << 24) | (__pyx_v_tmp64a << 16)) | (__pyx_v_tmp64b << 8)) | __pyx_v_tmp64c);
105: i += 7
/* "byte_offset.pyx":105
* #Assemble data into a long long
* current = (tmp64 << 24) | (tmp64a << 16) | (tmp64b << 8) | (tmp64c);
* i += 7 # <<<<<<<<<<<<<<
* else:
* tmp8 = cstream[i + 2];
*/
__pyx_v_i = (__pyx_v_i + 7);
}
__pyx_L14:;
goto __pyx_L13;
}
/*else*/ {
106: else:
107: tmp8 = cstream[i + 2];
/* "byte_offset.pyx":107
* i += 7
* else:
* tmp8 = cstream[i + 2]; # <<<<<<<<<<<<<<
* utmp8a = cstream[i + 1]
* # cast them in 64 bit
*/
__pyx_v_tmp8 = (__pyx_v_cstream[(__pyx_v_i + 2)]);
108: utmp8a = cstream[i + 1]
/* "byte_offset.pyx":108
* else:
* tmp8 = cstream[i + 2];
* utmp8a = cstream[i + 1] # <<<<<<<<<<<<<<
* # cast them in 64 bit
* tmp64 = tmp8
*/
__pyx_v_utmp8a = (__pyx_v_cstream[(__pyx_v_i + 1)]);
109: # cast them in 64 bit
110: tmp64 = tmp8
/* "byte_offset.pyx":110
* utmp8a = cstream[i + 1]
* # cast them in 64 bit
* tmp64 = tmp8 # <<<<<<<<<<<<<<
* tmp64a = utmp8a
* current = (tmp64 << 8) | (tmp64a);
*/
__pyx_v_tmp64 = __pyx_v_tmp8;
111: tmp64a = utmp8a
/* "byte_offset.pyx":111
* # cast them in 64 bit
* tmp64 = tmp8
* tmp64a = utmp8a # <<<<<<<<<<<<<<
* current = (tmp64 << 8) | (tmp64a);
* i += 3
*/
__pyx_v_tmp64a = __pyx_v_utmp8a;
112: current = (tmp64 << 8) | (tmp64a);
/* "byte_offset.pyx":112
* tmp64 = tmp8
* tmp64a = utmp8a
* current = (tmp64 << 8) | (tmp64a); # <<<<<<<<<<<<<<
* i += 3
* else:
*/
__pyx_v_current = ((__pyx_v_tmp64 << 8) | __pyx_v_tmp64a);
113: i += 3
/* "byte_offset.pyx":113
* tmp64a = utmp8a
* current = (tmp64 << 8) | (tmp64a);
* i += 3 # <<<<<<<<<<<<<<
* else:
* tmp8 = cstream[i]
*/
__pyx_v_i = (__pyx_v_i + 3);
}
__pyx_L13:;
goto __pyx_L12;
}
/*else*/ {
114: else:
115: tmp8 = cstream[i]
/* "byte_offset.pyx":115
* i += 3
* else:
* tmp8 = cstream[i] # <<<<<<<<<<<<<<
* current = tmp8
* i += 1
*/
__pyx_v_tmp8 = (__pyx_v_cstream[__pyx_v_i]);
116: current = tmp8
/* "byte_offset.pyx":116
* else:
* tmp8 = cstream[i]
* current = tmp8 # <<<<<<<<<<<<<<
* i += 1
* last += current
*/
__pyx_v_current = __pyx_v_tmp8;
117: i += 1
/* "byte_offset.pyx":117
* tmp8 = cstream[i]
* current = tmp8
* i += 1 # <<<<<<<<<<<<<<
* last += current
* dataOut[j] = last
*/
__pyx_v_i = (__pyx_v_i + 1);
}
__pyx_L12:;
118: last += current
/* "byte_offset.pyx":118
* current = tmp8
* i += 1
* last += current # <<<<<<<<<<<<<<
* dataOut[j] = last
* j += 1
*/
__pyx_v_last = (__pyx_v_last + __pyx_v_current);
119: dataOut[j] = last
/* "byte_offset.pyx":119
* i += 1
* last += current
* dataOut[j] = last # <<<<<<<<<<<<<<
* j += 1
* return dataOut[:j]
*/
__pyx_t_4 = __pyx_v_j;
if (__pyx_t_4 < 0) __pyx_t_4 += __pyx_pybuffernd_dataOut.diminfo[0].shape;
*__Pyx_BufPtrStrided1d(PY_LONG_LONG *, __pyx_pybuffernd_dataOut.rcbuffer->pybuffer.buf, __pyx_t_4, __pyx_pybuffernd_dataOut.diminfo[0].strides) = __pyx_v_last;
120: j += 1
/* "byte_offset.pyx":120
* last += current
* dataOut[j] = last
* j += 1 # <<<<<<<<<<<<<<
* return dataOut[:j]
*/
__pyx_v_j = (__pyx_v_j + 1);
}
}
121: return dataOut[:j]
/* "byte_offset.pyx":121 * dataOut[j] = last * j += 1 * return dataOut[:j] #<<<<<<<<<<<<<<*/ __Pyx_XDECREF(__pyx_r); __pyx_t_9 = __Pyx_PySequence_GetSlice(((PyObject *)__pyx_v_dataOut), 0, __pyx_v_j); if (unlikely(!__pyx_t_9)) {__pyx_filename = __pyx_f[0]; __pyx_lineno = 121; __pyx_clineno = __LINE__; goto __pyx_L1_error;} __Pyx_GOTREF(__pyx_t_9); __pyx_r = __pyx_t_9; __pyx_t_9 = 0; goto __pyx_L0; __pyx_r = Py_None; __Pyx_INCREF(Py_None); goto __pyx_L0; __pyx_L1_error:; __Pyx_XDECREF(__pyx_t_5); __Pyx_XDECREF(__pyx_t_6); __Pyx_XDECREF(__pyx_t_7); __Pyx_XDECREF(__pyx_t_8); __Pyx_XDECREF(__pyx_t_9); { PyObject *__pyx_type, *__pyx_value, *__pyx_tb; __Pyx_ErrFetch(&__pyx_type, &__pyx_value, &__pyx_tb); __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dataOut.rcbuffer->pybuffer); __Pyx_ErrRestore(__pyx_type, __pyx_value, __pyx_tb);} __Pyx_AddTraceback("byte_offset.analyseCython", __pyx_clineno, __pyx_lineno, __pyx_filename); __pyx_r = NULL; goto __pyx_L2; __pyx_L0:; __Pyx_SafeReleaseBuffer(&__pyx_pybuffernd_dataOut.rcbuffer->pybuffer); __pyx_L2:; __Pyx_XDECREF((PyObject *)__pyx_v_dataOut); __Pyx_XGIVEREF(__pyx_r); __Pyx_RefNannyFinishContext(); return __pyx_r; }