Cython: jsonl_reader.pyx

Generated by Cython 3.1.6

Yellow lines hint at Python interaction.
Click on a line that starts with a "`+`" to see the C code that Cython generated for it.

Raw output: jsonl_reader.cpp

    +001: """Cython wrapper for reading JSONL files."""

      __pyx_t_2 = __Pyx_PyDict_NewPresized(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_test, __pyx_t_2) < (0)) __PYX_ERR(0, 1, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     002:

     003: # distutils: language = c++

     004: # cython: language_level=3

     005: # cython: nonecheck=False

     006: # cython: cdivision=True

     007: # cython: boundscheck=False

     008: # cython: wraparound=False

     009: # cython: infer_types=True

     010:

     011: from libc.stdint cimport uint8_t, int64_t

     012: from libcpp.string cimport string

     013: from libcpp.vector cimport vector

     014: from cpython.buffer cimport PyBUF_CONTIG_RO, PyObject_GetBuffer, PyBuffer_Release, Py_buffer

    +015: import json

      __pyx_t_2 = __Pyx_ImportDottedModule(__pyx_mstate_global->__pyx_n_u_json, NULL); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 15, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_json, __pyx_t_2) < (0)) __PYX_ERR(0, 15, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     016: from cpython.ref cimport PyObject, Py_INCREF, Py_DECREF

     017: from cpython.exc cimport PyErr_Occurred

     018: from cpython.list cimport PyList_Append

     019: from cpython.exc cimport PyErr_Clear

     020: from cpython.bytes cimport PyBytes_FromStringAndSize

     021:

     022: # Internal fast array parser (no runtime deps). Parses a JSON array encoded

     023: # in UTF-8 bytes into Python lists. Objects found inside arrays are returned

     024: # as raw bytes; strings are unescaped to Python str; numbers become int/float;

     025: # null -> None, true/false -> bool.

     026:

     027:

     028: # (removed unused fast whitespace skip function)

     029:

     030:

    +031: def _parse_array_from_bytes(bytes b):

    /* Python wrapper */
    static PyObject *__pyx_pw_4rugo_5jsonl_1_parse_array_from_bytes(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_4rugo_5jsonl_1_parse_array_from_bytes = {"_parse_array_from_bytes", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4rugo_5jsonl_1_parse_array_from_bytes, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_4rugo_5jsonl_1_parse_array_from_bytes(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_b = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_parse_array_from_bytes (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_b,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 31, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 31, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_parse_array_from_bytes", 0) < (0)) __PYX_ERR(0, 31, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_parse_array_from_bytes", 1, 1, 1, i); __PYX_ERR(0, 31, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 31, __pyx_L3_error)
        }
        __pyx_v_b = ((PyObject*)values[0]);
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_parse_array_from_bytes", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 31, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("rugo.jsonl._parse_array_from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      if (unlikely(!__Pyx_ArgTypeTest(((PyObject *)__pyx_v_b), (&PyBytes_Type), 1, "b", 1))) __PYX_ERR(0, 31, __pyx_L1_error)
      __pyx_r = __pyx_pf_4rugo_5jsonl__parse_array_from_bytes(__pyx_self, __pyx_v_b);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      goto __pyx_L0;
      __pyx_L1_error:;
      __pyx_r = NULL;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      goto __pyx_L7_cleaned_up;
      __pyx_L0:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __pyx_L7_cleaned_up:;
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
    static PyObject *__pyx_pf_4rugo_5jsonl__parse_array_from_bytes(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_b) {
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes *__pyx_cur_scope;
      PyObject *__pyx_r = NULL;
      __pyx_cur_scope = (struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes *)__pyx_tp_new_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes(__pyx_mstate_global->__pyx_ptype_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(0, 31, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
      __pyx_cur_scope->__pyx_v_b = __pyx_v_b;
      __Pyx_INCREF(__pyx_cur_scope->__pyx_v_b);
      __Pyx_GIVEREF(__pyx_cur_scope->__pyx_v_b);
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_1);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("rugo.jsonl._parse_array_from_bytes", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_DECREF((PyObject *)__pyx_cur_scope);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4rugo_5jsonl_1_parse_array_from_bytes, 0, __pyx_mstate_global->__pyx_n_u_parse_array_from_bytes, NULL, __pyx_mstate_global->__pyx_n_u_rugo_jsonl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[4])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 31, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_parse_array_from_bytes, __pyx_t_2) < (0)) __PYX_ERR(0, 31, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /* … */
    struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes {
      PyObject_HEAD
      PyObject *__pyx_v_b;
      Py_ssize_t __pyx_v_i;
      Py_ssize_t __pyx_v_n;
      PyObject *__pyx_v_parse_value;
    };

    +032:     cdef Py_ssize_t i = 0

      __pyx_cur_scope->__pyx_v_i = 0;

    +033:     cdef Py_ssize_t n = len(b)

      __pyx_t_1 = __pyx_cur_scope->__pyx_v_b;
      __Pyx_INCREF(__pyx_t_1);
      if (unlikely(__pyx_t_1 == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
        __PYX_ERR(0, 33, __pyx_L1_error)
      }
      __pyx_t_2 = __Pyx_PyBytes_GET_SIZE(__pyx_t_1); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 33, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_cur_scope->__pyx_v_n = __pyx_t_2;

     034:

    +035:     def parse_value():

    /* Python wrapper */
    static PyObject *__pyx_pw_4rugo_5jsonl_23_parse_array_from_bytes_1parse_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused); /*proto*/
    static PyMethodDef __pyx_mdef_4rugo_5jsonl_23_parse_array_from_bytes_1parse_value = {"parse_value", (PyCFunction)__pyx_pw_4rugo_5jsonl_23_parse_array_from_bytes_1parse_value, METH_NOARGS, 0};
    static PyObject *__pyx_pw_4rugo_5jsonl_23_parse_array_from_bytes_1parse_value(PyObject *__pyx_self, CYTHON_UNUSED PyObject *unused) {
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("parse_value (wrapper)", 0);
      __pyx_kwvalues = __Pyx_KwValues_VARARGS(__pyx_args, __pyx_nargs);
      __pyx_r = __pyx_pf_4rugo_5jsonl_23_parse_array_from_bytes_parse_value(__pyx_self);

      /* function exit code */
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_4rugo_5jsonl_23_parse_array_from_bytes_parse_value(PyObject *__pyx_self) {
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes *__pyx_cur_scope;
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes *__pyx_outer_scope;
      PyObject *__pyx_v_c = NULL;
      PyObject *__pyx_v_chars = NULL;
      PyObject *__pyx_v_ch = NULL;
      PyObject *__pyx_v_esc = NULL;
      PyObject *__pyx_v_hex_s = NULL;
      PyObject *__pyx_v_cp = NULL;
      Py_ssize_t __pyx_v_start;
      PyObject *__pyx_v_s = NULL;
      PyObject *__pyx_v_res = NULL;
      PyObject *__pyx_v_val = NULL;
      PyObject *__pyx_v_depth = NULL;
      PyObject *__pyx_r = NULL;
      __pyx_outer_scope = (struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct___parse_array_from_bytes *) __Pyx_CyFunction_GetClosure(__pyx_self);
      __pyx_cur_scope = __pyx_outer_scope;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_3);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_13);
      __Pyx_XDECREF(__pyx_t_15);
      __Pyx_AddTraceback("rugo.jsonl._parse_array_from_bytes.parse_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_c);
      __Pyx_XDECREF(__pyx_v_chars);
      __Pyx_XDECREF(__pyx_v_ch);
      __Pyx_XDECREF(__pyx_v_esc);
      __Pyx_XDECREF(__pyx_v_hex_s);
      __Pyx_XDECREF(__pyx_v_cp);
      __Pyx_XDECREF(__pyx_v_s);
      __Pyx_XDECREF(__pyx_v_res);
      __Pyx_XDECREF(__pyx_v_val);
      __Pyx_XDECREF(__pyx_v_depth);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_1 = __Pyx_CyFunction_New(&__pyx_mdef_4rugo_5jsonl_23_parse_array_from_bytes_1parse_value, 0, __pyx_mstate_global->__pyx_n_u_parse_array_from_bytes_locals_p, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_rugo_jsonl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[0])); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 35, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __Pyx_GIVEREF(__pyx_t_1);
      __pyx_cur_scope->__pyx_v_parse_value = __pyx_t_1;
      __pyx_t_1 = 0;

     036:         nonlocal i

     037:         # skip whitespace

    +038:         while i < n and b[i] in (32,9,10,13):

      while (1) {
        __pyx_t_2 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
        if (__pyx_t_2) {
        } else {
          __pyx_t_1 = __pyx_t_2;
          goto __pyx_L5_bool_binop_done;
        }
        if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 38, __pyx_L1_error) }
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 38, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_32, 32, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 38, __pyx_L1_error)
        if (!__pyx_t_4) {
        } else {
          __pyx_t_2 = __pyx_t_4;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_9, 9, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 38, __pyx_L1_error)
        if (!__pyx_t_4) {
        } else {
          __pyx_t_2 = __pyx_t_4;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_10, 10, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 38, __pyx_L1_error)
        if (!__pyx_t_4) {
        } else {
          __pyx_t_2 = __pyx_t_4;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_13, 13, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 38, __pyx_L1_error)
        __pyx_t_2 = __pyx_t_4;
        __pyx_L7_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_4 = __pyx_t_2;
        __pyx_t_1 = __pyx_t_4;
        __pyx_L5_bool_binop_done:;
        if (!__pyx_t_1) break;

    +039:             i += 1

        __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
      }

    +040:         if i >= n:

      __pyx_t_1 = (__pyx_cur_scope->__pyx_v_i >= __pyx_cur_scope->__pyx_v_n);
      if (unlikely(__pyx_t_1)) {
    /* … */
      }

    +041:             raise ValueError('unexpected end')

        __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_6 = __pyx_builtin_ValueError;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_unexpected_end};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 41, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 41, __pyx_L1_error)

    +042:         c = b[i]

      if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 42, __pyx_L1_error) }
      __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 42, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_3);
      __pyx_v_c = __pyx_t_3;
      __pyx_t_3 = 0;

     043:         # string

    +044:         if c == 34:  # '"'

      __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_c, __pyx_mstate_global->__pyx_int_34, 34, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 44, __pyx_L1_error)
      if (__pyx_t_1) {
    /* … */
      }

    +045:             i += 1

        __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +046:             chars = []

        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 46, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_v_chars = ((PyObject*)__pyx_t_3);
        __pyx_t_3 = 0;

    +047:             while i < n:

        while (1) {
          __pyx_t_1 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
          if (!__pyx_t_1) break;

    +048:                 ch = b[i]

          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 48, __pyx_L1_error) }
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 48, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_ch, __pyx_t_3);
          __pyx_t_3 = 0;

    +049:                 if ch == 34:

          __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_ch, __pyx_mstate_global->__pyx_int_34, 34, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 49, __pyx_L1_error)
          if (__pyx_t_1) {
    /* … */
          }

    +050:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +051:                     return ''.join(chars)

            __Pyx_XDECREF(__pyx_r);
            __pyx_t_3 = PyUnicode_Join(__pyx_mstate_global->__pyx_kp_u_, __pyx_v_chars); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 51, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_r = __pyx_t_3;
            __pyx_t_3 = 0;
            goto __pyx_L0;

    +052:                 if ch == 92:  # backslash

          __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_ch, __pyx_mstate_global->__pyx_int_92, 92, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 52, __pyx_L1_error)
          if (__pyx_t_1) {
    /* … */
            goto __pyx_L16;
          }

    +053:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +054:                     if i >= n:

            __pyx_t_1 = (__pyx_cur_scope->__pyx_v_i >= __pyx_cur_scope->__pyx_v_n);
            if (unlikely(__pyx_t_1)) {
    /* … */
            }

    +055:                         raise ValueError('unterminated escape')

              __pyx_t_6 = NULL;
              __Pyx_INCREF(__pyx_builtin_ValueError);
              __pyx_t_5 = __pyx_builtin_ValueError;
              __pyx_t_7 = 1;
              {
                PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_unterminated_escape};
                __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 55, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
              }
              __Pyx_Raise(__pyx_t_3, 0, 0, 0);
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __PYX_ERR(0, 55, __pyx_L1_error)

    +056:                     esc = b[i]

            if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 56, __pyx_L1_error) }
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 56, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_XDECREF_SET(__pyx_v_esc, __pyx_t_3);
            __pyx_t_3 = 0;

    +057:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +058:                     if esc == 34: chars.append('"')

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_34, 34, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 58, __pyx_L1_error)
            if (__pyx_t_1) {
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_mstate_global->__pyx_kp_u__2); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 58, __pyx_L1_error)
              goto __pyx_L18;
            }

    +059:                     elif esc == 92: chars.append('\\')

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_92, 92, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 59, __pyx_L1_error)
            if (__pyx_t_1) {
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_mstate_global->__pyx_kp_u__3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 59, __pyx_L1_error)
              goto __pyx_L18;
            }

    +060:                     elif esc == 47: chars.append('/')

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_47, 47, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 60, __pyx_L1_error)
            if (__pyx_t_1) {
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_mstate_global->__pyx_kp_u__4); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 60, __pyx_L1_error)
              goto __pyx_L18;
            }

    +061:                     elif esc == 98: chars.append('\b')

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_98, 98, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 61, __pyx_L1_error)
            if (__pyx_t_1) {
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_mstate_global->__pyx_kp_u__5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 61, __pyx_L1_error)
              goto __pyx_L18;
            }

    +062:                     elif esc == 102: chars.append('\f')

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_102, 0x66, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 62, __pyx_L1_error)
            if (__pyx_t_1) {
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_mstate_global->__pyx_kp_u__6); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 62, __pyx_L1_error)
              goto __pyx_L18;
            }

    +063:                     elif esc == 110: chars.append('\n')

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_110, 0x6E, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 63, __pyx_L1_error)
            if (__pyx_t_1) {
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_mstate_global->__pyx_kp_u__7); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 63, __pyx_L1_error)
              goto __pyx_L18;
            }

    +064:                     elif esc == 114: chars.append('\r')

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_114, 0x72, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 64, __pyx_L1_error)
            if (__pyx_t_1) {
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_mstate_global->__pyx_kp_u__8); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 64, __pyx_L1_error)
              goto __pyx_L18;
            }

    +065:                     elif esc == 116: chars.append('\t')

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_116, 0x74, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 65, __pyx_L1_error)
            if (__pyx_t_1) {
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_mstate_global->__pyx_kp_u__9); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 65, __pyx_L1_error)
              goto __pyx_L18;
            }

    +066:                     elif esc == 117:

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_esc, __pyx_mstate_global->__pyx_int_117, 0x75, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 66, __pyx_L1_error)
            if (__pyx_t_1) {
    /* … */
              goto __pyx_L18;
            }

     067:                         # unicode escape \uXXXX

    +068:                         if i + 4 <= n:

              __pyx_t_1 = ((__pyx_cur_scope->__pyx_v_i + 4) <= __pyx_cur_scope->__pyx_v_n);
              if (likely(__pyx_t_1)) {
    /* … */
                goto __pyx_L19;
              }

    +069:                             hex_s = b[i:i+4].decode('ascii')

                if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 69, __pyx_L1_error) }
                if (unlikely(__pyx_cur_scope->__pyx_v_b == Py_None)) {
                  PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                  __PYX_ERR(0, 69, __pyx_L1_error)
                }
                __pyx_t_3 = __Pyx_decode_bytes(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, (__pyx_cur_scope->__pyx_v_i + 4), NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 69, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_3);
                __Pyx_XDECREF_SET(__pyx_v_hex_s, ((PyObject*)__pyx_t_3));
                __pyx_t_3 = 0;

    +070:                             try:

                {
                  /*try:*/ {
    /* … */
                  }
                  __Pyx_XDECREF(__pyx_t_9); __pyx_t_9 = 0;
                  __Pyx_XDECREF(__pyx_t_10); __pyx_t_10 = 0;
                  __Pyx_XDECREF(__pyx_t_11); __pyx_t_11 = 0;
                  goto __pyx_L27_try_end;
                  __pyx_L20_error:;
                  __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                  __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    /* … */
                  __pyx_L22_except_error:;
                  __Pyx_XGIVEREF(__pyx_t_9);
                  __Pyx_XGIVEREF(__pyx_t_10);
                  __Pyx_XGIVEREF(__pyx_t_11);
                  __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                  goto __pyx_L1_error;
                  __pyx_L21_exception_handled:;
                  __Pyx_XGIVEREF(__pyx_t_9);
                  __Pyx_XGIVEREF(__pyx_t_10);
                  __Pyx_XGIVEREF(__pyx_t_11);
                  __Pyx_ExceptionReset(__pyx_t_9, __pyx_t_10, __pyx_t_11);
                  __pyx_L27_try_end:;
                }

    +071:                                 cp = int(hex_s, 16)

                    __pyx_t_5 = NULL;
                    __Pyx_INCREF((PyObject *)(&PyLong_Type));
                    __pyx_t_6 = ((PyObject *)(&PyLong_Type));
                    __pyx_t_7 = 1;
                    {
                      PyObject *__pyx_callargs[3] = {__pyx_t_5, __pyx_v_hex_s, __pyx_mstate_global->__pyx_int_16};
                      __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (3-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 71, __pyx_L20_error)
                      __Pyx_GOTREF(__pyx_t_3);
                    }
                    __Pyx_XDECREF_SET(__pyx_v_cp, ((PyObject*)__pyx_t_3));
                    __pyx_t_3 = 0;

    +072:                                 chars.append(chr(cp))

                    __pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_cp); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 72, __pyx_L20_error)
                    __pyx_t_3 = PyUnicode_FromOrdinal(__pyx_t_12); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 72, __pyx_L20_error)
                    __Pyx_GOTREF(__pyx_t_3);
                    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_t_3); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 72, __pyx_L20_error)
                    __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;

    +073:                             except Exception:

                  __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
                  if (__pyx_t_12) {
                    __Pyx_AddTraceback("rugo.jsonl._parse_array_from_bytes.parse_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
                    if (__Pyx_GetException(&__pyx_t_3, &__pyx_t_6, &__pyx_t_5) < 0) __PYX_ERR(0, 73, __pyx_L22_except_error)
                    __Pyx_XGOTREF(__pyx_t_3);
                    __Pyx_XGOTREF(__pyx_t_6);
                    __Pyx_XGOTREF(__pyx_t_5);

    +074:                                 chars.append('\\u' + hex_s)

                    __pyx_t_13 = __Pyx_PyUnicode_Concat(__pyx_mstate_global->__pyx_kp_u_u, __pyx_v_hex_s); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 74, __pyx_L22_except_error)
                    __Pyx_GOTREF(__pyx_t_13);
                    __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_t_13); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 74, __pyx_L22_except_error)
                    __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
                    __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
                    goto __pyx_L21_exception_handled;
                  }
                  goto __pyx_L22_except_error;

    +075:                             i += 4

                __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 4);

     076:                         else:

    +077:                             raise ValueError('invalid unicode escape')

              /*else*/ {
                __pyx_t_6 = NULL;
                __Pyx_INCREF(__pyx_builtin_ValueError);
                __pyx_t_3 = __pyx_builtin_ValueError;
                __pyx_t_7 = 1;
                {
                  PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_invalid_unicode_escape};
                  __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_3, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
                  if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 77, __pyx_L1_error)
                  __Pyx_GOTREF(__pyx_t_5);
                }
                __Pyx_Raise(__pyx_t_5, 0, 0, 0);
                __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
                __PYX_ERR(0, 77, __pyx_L1_error)
              }
              __pyx_L19:;

     078:                     else:

     079:                         # unknown escape, keep char

    +080:                         chars.append(chr(esc))

            /*else*/ {
              __pyx_t_12 = __Pyx_PyLong_As_int(__pyx_v_esc); if (unlikely((__pyx_t_12 == (int)-1) && PyErr_Occurred())) __PYX_ERR(0, 80, __pyx_L1_error)
              __pyx_t_5 = PyUnicode_FromOrdinal(__pyx_t_12); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 80, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 80, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            }
            __pyx_L18:;

     081:                 else:

     082:                     # append raw utf-8 byte; accumulate then decode at end

     083:                     # to support multi-byte UTF-8 sequences, collect bytes

    +084:                     start = i

          /*else*/ {
            __pyx_v_start = __pyx_cur_scope->__pyx_v_i;

     085:                     # collect consecutive non-escape non-quote bytes

    +086:                     while i < n and b[i] != 34 and b[i] != 92:

            while (1) {
              __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
              if (__pyx_t_4) {
              } else {
                __pyx_t_1 = __pyx_t_4;
                goto __pyx_L32_bool_binop_done;
              }
              if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 86, __pyx_L1_error) }
              __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_4 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_34, 34, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 86, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (__pyx_t_4) {
              } else {
                __pyx_t_1 = __pyx_t_4;
                goto __pyx_L32_bool_binop_done;
              }
              if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 86, __pyx_L1_error) }
              __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 86, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
              __pyx_t_4 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_92, 92, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 86, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __pyx_t_1 = __pyx_t_4;
              __pyx_L32_bool_binop_done:;
              if (!__pyx_t_1) break;

    +087:                         i += 1

              __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
            }

     088:                     # decode slice

    +089:                     chars.append(b[start:i].decode('utf-8'))

            if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 89, __pyx_L1_error) }
            if (unlikely(__pyx_cur_scope->__pyx_v_b == Py_None)) {
              PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
              __PYX_ERR(0, 89, __pyx_L1_error)
            }
            __pyx_t_5 = __Pyx_decode_bytes(__pyx_cur_scope->__pyx_v_b, __pyx_v_start, __pyx_cur_scope->__pyx_v_i, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 89, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_chars, __pyx_t_5); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 89, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          }
          __pyx_L16:;
        }

    +090:             raise ValueError('unterminated string')

        __pyx_t_3 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_6 = __pyx_builtin_ValueError;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_3, __pyx_mstate_global->__pyx_kp_u_unterminated_string};
          __pyx_t_5 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 90, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
        }
        __Pyx_Raise(__pyx_t_5, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __PYX_ERR(0, 90, __pyx_L1_error)

     091:

     092:         # null

    +093:         if c == 110 and i + 4 <= n and b[i:i+4] == b'null':

      __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_c, __pyx_mstate_global->__pyx_int_110, 0x6E, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 93, __pyx_L1_error)
      if (__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L36_bool_binop_done;
      }
      __pyx_t_4 = ((__pyx_cur_scope->__pyx_v_i + 4) <= __pyx_cur_scope->__pyx_v_n);
      if (__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L36_bool_binop_done;
      }
      if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 93, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_v_b == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 93, __pyx_L1_error)
      }
      __pyx_t_5 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, (__pyx_cur_scope->__pyx_v_i + 4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 93, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_mstate_global->__pyx_n_b_null, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 93, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __pyx_t_4;
      __pyx_L36_bool_binop_done:;
      if (__pyx_t_1) {
    /* … */
      }

    +094:             i += 4

        __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 4);

    +095:             return None

        __Pyx_XDECREF(__pyx_r);
        __pyx_r = Py_None; __Pyx_INCREF(Py_None);
        goto __pyx_L0;

     096:

     097:         # true/false

    +098:         if c == 116 and i + 4 <= n and b[i:i+4] == b'true':

      __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_c, __pyx_mstate_global->__pyx_int_116, 0x74, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 98, __pyx_L1_error)
      if (__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L40_bool_binop_done;
      }
      __pyx_t_4 = ((__pyx_cur_scope->__pyx_v_i + 4) <= __pyx_cur_scope->__pyx_v_n);
      if (__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L40_bool_binop_done;
      }
      if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 98, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_v_b == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 98, __pyx_L1_error)
      }
      __pyx_t_5 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, (__pyx_cur_scope->__pyx_v_i + 4)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 98, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_mstate_global->__pyx_n_b_true, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 98, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __pyx_t_4;
      __pyx_L40_bool_binop_done:;
      if (__pyx_t_1) {
    /* … */
      }

    +099:             i += 4

        __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 4);

    +100:             return True

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_True);
        __pyx_r = Py_True;
        goto __pyx_L0;

    +101:         if c == 102 and i + 5 <= n and b[i:i+5] == b'false':

      __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_c, __pyx_mstate_global->__pyx_int_102, 0x66, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 101, __pyx_L1_error)
      if (__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L44_bool_binop_done;
      }
      __pyx_t_4 = ((__pyx_cur_scope->__pyx_v_i + 5) <= __pyx_cur_scope->__pyx_v_n);
      if (__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L44_bool_binop_done;
      }
      if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 101, __pyx_L1_error) }
      if (unlikely(__pyx_cur_scope->__pyx_v_b == Py_None)) {
        PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
        __PYX_ERR(0, 101, __pyx_L1_error)
      }
      __pyx_t_5 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, (__pyx_cur_scope->__pyx_v_i + 5)); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 101, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_5);
      __pyx_t_4 = (__Pyx_PyBytes_Equals(__pyx_t_5, __pyx_mstate_global->__pyx_n_b_false, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 101, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __pyx_t_4;
      __pyx_L44_bool_binop_done:;
      if (__pyx_t_1) {
    /* … */
      }

    +102:             i += 5

        __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 5);

    +103:             return False

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;

     104:

     105:         # number

    +106:         if c == 45 or (48 <= c <= 57):

      __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_c, __pyx_mstate_global->__pyx_int_45, 45, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 106, __pyx_L1_error)
      if (!__pyx_t_4) {
      } else {
        __pyx_t_1 = __pyx_t_4;
        goto __pyx_L48_bool_binop_done;
      }
      __pyx_t_5 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_48, __pyx_v_c, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error)
      if (__Pyx_PyObject_IsTrue(__pyx_t_5)) {
        __Pyx_DECREF(__pyx_t_5);
        __pyx_t_5 = PyObject_RichCompare(__pyx_v_c, __pyx_mstate_global->__pyx_int_57, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 106, __pyx_L1_error)
      }
      __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 106, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
      __pyx_t_1 = __pyx_t_4;
      __pyx_L48_bool_binop_done:;
      if (__pyx_t_1) {
    /* … */
      }

    +107:             start = i

        __pyx_v_start = __pyx_cur_scope->__pyx_v_i;

    +108:             if c == 45:

        __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_c, __pyx_mstate_global->__pyx_int_45, 45, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 108, __pyx_L1_error)
        if (__pyx_t_1) {
    /* … */
        }

    +109:                 i += 1

          __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +110:             while i < n and 48 <= b[i] <= 57:

        while (1) {
          __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
          if (__pyx_t_4) {
          } else {
            __pyx_t_1 = __pyx_t_4;
            goto __pyx_L53_bool_binop_done;
          }
          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 110, __pyx_L1_error) }
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 110, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_6 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_48, __pyx_t_5, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
          if (__Pyx_PyObject_IsTrue(__pyx_t_6)) {
            __Pyx_DECREF(__pyx_t_6);
            __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_mstate_global->__pyx_int_57, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 110, __pyx_L1_error)
          }
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 110, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_1 = __pyx_t_4;
          __pyx_L53_bool_binop_done:;
          if (!__pyx_t_1) break;

    +111:                 i += 1

          __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
        }

    +112:             if i < n and b[i] == 46:

        __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
        if (__pyx_t_4) {
        } else {
          __pyx_t_1 = __pyx_t_4;
          goto __pyx_L56_bool_binop_done;
        }
        if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 112, __pyx_L1_error) }
        __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 112, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_6, __pyx_mstate_global->__pyx_int_46, 46, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 112, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
        __pyx_t_1 = __pyx_t_4;
        __pyx_L56_bool_binop_done:;
        if (__pyx_t_1) {
    /* … */
        }

    +113:                 i += 1

          __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +114:                 while i < n and 48 <= b[i] <= 57:

          while (1) {
            __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
            if (__pyx_t_4) {
            } else {
              __pyx_t_1 = __pyx_t_4;
              goto __pyx_L60_bool_binop_done;
            }
            if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 114, __pyx_L1_error) }
            __pyx_t_6 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 114, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_6);
            __pyx_t_5 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_48, __pyx_t_6, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
            if (__Pyx_PyObject_IsTrue(__pyx_t_5)) {
              __Pyx_DECREF(__pyx_t_5);
              __pyx_t_5 = PyObject_RichCompare(__pyx_t_6, __pyx_mstate_global->__pyx_int_57, Py_LE); __Pyx_XGOTREF(__pyx_t_5); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 114, __pyx_L1_error)
            }
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 114, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_1 = __pyx_t_4;
            __pyx_L60_bool_binop_done:;
            if (!__pyx_t_1) break;

    +115:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
          }

    +116:             if i < n and (b[i] == 101 or b[i] == 69):

        __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
        if (__pyx_t_4) {
        } else {
          __pyx_t_1 = __pyx_t_4;
          goto __pyx_L63_bool_binop_done;
        }
        if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 116, __pyx_L1_error) }
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_101, 0x65, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (!__pyx_t_4) {
        } else {
          __pyx_t_1 = __pyx_t_4;
          goto __pyx_L63_bool_binop_done;
        }
        if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 116, __pyx_L1_error) }
        __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_5);
        __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_69, 69, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 116, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        __pyx_t_1 = __pyx_t_4;
        __pyx_L63_bool_binop_done:;
        if (__pyx_t_1) {
    /* … */
        }

    +117:                 i += 1

          __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +118:                 if i < n and (b[i] == 43 or b[i] == 45):

          __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
          if (__pyx_t_4) {
          } else {
            __pyx_t_1 = __pyx_t_4;
            goto __pyx_L67_bool_binop_done;
          }
          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 118, __pyx_L1_error) }
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_43, 43, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 118, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (!__pyx_t_4) {
          } else {
            __pyx_t_1 = __pyx_t_4;
            goto __pyx_L67_bool_binop_done;
          }
          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 118, __pyx_L1_error) }
          __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 118, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_5, __pyx_mstate_global->__pyx_int_45, 45, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 118, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          __pyx_t_1 = __pyx_t_4;
          __pyx_L67_bool_binop_done:;
          if (__pyx_t_1) {
    /* … */
          }

    +119:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +120:                 while i < n and 48 <= b[i] <= 57:

          while (1) {
            __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
            if (__pyx_t_4) {
            } else {
              __pyx_t_1 = __pyx_t_4;
              goto __pyx_L72_bool_binop_done;
            }
            if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 120, __pyx_L1_error) }
            __pyx_t_5 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 120, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __pyx_t_6 = PyObject_RichCompare(__pyx_mstate_global->__pyx_int_48, __pyx_t_5, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error)
            if (__Pyx_PyObject_IsTrue(__pyx_t_6)) {
              __Pyx_DECREF(__pyx_t_6);
              __pyx_t_6 = PyObject_RichCompare(__pyx_t_5, __pyx_mstate_global->__pyx_int_57, Py_LE); __Pyx_XGOTREF(__pyx_t_6); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 120, __pyx_L1_error)
            }
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
            __pyx_t_4 = __Pyx_PyObject_IsTrue(__pyx_t_6); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 120, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
            __pyx_t_1 = __pyx_t_4;
            __pyx_L72_bool_binop_done:;
            if (!__pyx_t_1) break;

    +121:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
          }

    +122:                 return float(b[start:i].decode('ascii'))

          __Pyx_XDECREF(__pyx_r);
          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 122, __pyx_L1_error) }
          if (unlikely(__pyx_cur_scope->__pyx_v_b == Py_None)) {
            PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
            __PYX_ERR(0, 122, __pyx_L1_error)
          }
          __pyx_t_6 = __Pyx_decode_bytes(__pyx_cur_scope->__pyx_v_b, __pyx_v_start, __pyx_cur_scope->__pyx_v_i, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_t_14 = __Pyx_PyUnicode_AsDouble(__pyx_t_6); if (unlikely(__pyx_t_14 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 122, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          __pyx_t_6 = PyFloat_FromDouble(__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 122, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_r = __pyx_t_6;
          __pyx_t_6 = 0;
          goto __pyx_L0;

    +123:             s = b[start:i].decode('ascii')

        if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 123, __pyx_L1_error) }
        if (unlikely(__pyx_cur_scope->__pyx_v_b == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
          __PYX_ERR(0, 123, __pyx_L1_error)
        }
        __pyx_t_6 = __Pyx_decode_bytes(__pyx_cur_scope->__pyx_v_b, __pyx_v_start, __pyx_cur_scope->__pyx_v_i, NULL, NULL, PyUnicode_DecodeASCII); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 123, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_6);
        __pyx_v_s = ((PyObject*)__pyx_t_6);
        __pyx_t_6 = 0;

    +124:             if '.' in s or 'e' in s or 'E' in s:

        __pyx_t_4 = (__Pyx_PyUnicode_ContainsTF(__pyx_mstate_global->__pyx_kp_u__10, __pyx_v_s, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
        if (!__pyx_t_4) {
        } else {
          __pyx_t_1 = __pyx_t_4;
          goto __pyx_L75_bool_binop_done;
        }
        __pyx_t_4 = (__Pyx_PyUnicode_ContainsTF(__pyx_mstate_global->__pyx_n_u_e, __pyx_v_s, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
        if (!__pyx_t_4) {
        } else {
          __pyx_t_1 = __pyx_t_4;
          goto __pyx_L75_bool_binop_done;
        }
        __pyx_t_4 = (__Pyx_PyUnicode_ContainsTF(__pyx_mstate_global->__pyx_n_u_E, __pyx_v_s, Py_EQ)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 124, __pyx_L1_error)
        __pyx_t_1 = __pyx_t_4;
        __pyx_L75_bool_binop_done:;
        if (__pyx_t_1) {
    /* … */
        }

    +125:                 return float(s)

          __Pyx_XDECREF(__pyx_r);
          __pyx_t_14 = __Pyx_PyUnicode_AsDouble(__pyx_v_s); if (unlikely(__pyx_t_14 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 125, __pyx_L1_error)
          __pyx_t_6 = PyFloat_FromDouble(__pyx_t_14); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 125, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_6);
          __pyx_r = __pyx_t_6;
          __pyx_t_6 = 0;
          goto __pyx_L0;

     126:             else:

    +127:                 try:

        /*else*/ {
          {
            /*try:*/ {
    /* … */
            }
            __pyx_L78_error:;
            __Pyx_XDECREF(__pyx_t_13); __pyx_t_13 = 0;
            __Pyx_XDECREF(__pyx_t_3); __pyx_t_3 = 0;
            __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
    /* … */
            __pyx_L80_except_error:;
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_10);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
            goto __pyx_L1_error;
            __pyx_L82_try_return:;
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_10);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
            goto __pyx_L0;
            __pyx_L81_except_return:;
            __Pyx_XGIVEREF(__pyx_t_11);
            __Pyx_XGIVEREF(__pyx_t_10);
            __Pyx_XGIVEREF(__pyx_t_9);
            __Pyx_ExceptionReset(__pyx_t_11, __pyx_t_10, __pyx_t_9);
            goto __pyx_L0;
          }
        }

    +128:                     return int(s)

              __Pyx_XDECREF(__pyx_r);
              __pyx_t_6 = __Pyx_PyNumber_Int(__pyx_v_s); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 128, __pyx_L78_error)
              __Pyx_GOTREF(__pyx_t_6);
              __pyx_r = __pyx_t_6;
              __pyx_t_6 = 0;
              goto __pyx_L82_try_return;

    +129:                 except Exception:

            __pyx_t_12 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
            if (__pyx_t_12) {
              __Pyx_AddTraceback("rugo.jsonl._parse_array_from_bytes.parse_value", __pyx_clineno, __pyx_lineno, __pyx_filename);
              if (__Pyx_GetException(&__pyx_t_6, &__pyx_t_5, &__pyx_t_3) < 0) __PYX_ERR(0, 129, __pyx_L80_except_error)
              __Pyx_XGOTREF(__pyx_t_6);
              __Pyx_XGOTREF(__pyx_t_5);
              __Pyx_XGOTREF(__pyx_t_3);

    +130:                     return float(s)

              __Pyx_XDECREF(__pyx_r);
              __pyx_t_14 = __Pyx_PyUnicode_AsDouble(__pyx_v_s); if (unlikely(__pyx_t_14 == ((double)((double)-1)) && PyErr_Occurred())) __PYX_ERR(0, 130, __pyx_L80_except_error)
              __pyx_t_13 = PyFloat_FromDouble(__pyx_t_14); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 130, __pyx_L80_except_error)
              __Pyx_GOTREF(__pyx_t_13);
              __pyx_r = __pyx_t_13;
              __pyx_t_13 = 0;
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              goto __pyx_L81_except_return;
            }
            goto __pyx_L80_except_error;

     131:

     132:         # array

    +133:         if c == 91:  # '['

      __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_c, __pyx_mstate_global->__pyx_int_91, 91, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 133, __pyx_L1_error)
      if (__pyx_t_1) {
    /* … */
      }

     134:             # parse nested array

    +135:             i += 1

        __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +136:             res = []

        __pyx_t_3 = PyList_New(0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 136, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_v_res = ((PyObject*)__pyx_t_3);
        __pyx_t_3 = 0;

     137:             # skip whitespace

    +138:             while i < n and b[i] in (32,9,10,13): i += 1

        while (1) {
          __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
          if (__pyx_t_4) {
          } else {
            __pyx_t_1 = __pyx_t_4;
            goto __pyx_L89_bool_binop_done;
          }
          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 138, __pyx_L1_error) }
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 138, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_32, 32, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 138, __pyx_L1_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_4 = __pyx_t_2;
            goto __pyx_L91_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_9, 9, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 138, __pyx_L1_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_4 = __pyx_t_2;
            goto __pyx_L91_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_10, 10, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 138, __pyx_L1_error)
          if (!__pyx_t_2) {
          } else {
            __pyx_t_4 = __pyx_t_2;
            goto __pyx_L91_bool_binop_done;
          }
          __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_13, 13, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 138, __pyx_L1_error)
          __pyx_t_4 = __pyx_t_2;
          __pyx_L91_bool_binop_done:;
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          __pyx_t_2 = __pyx_t_4;
          __pyx_t_1 = __pyx_t_2;
          __pyx_L89_bool_binop_done:;
          if (!__pyx_t_1) break;
          __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
        }

    +139:             if i < n and b[i] == 93:

        __pyx_t_2 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
        if (__pyx_t_2) {
        } else {
          __pyx_t_1 = __pyx_t_2;
          goto __pyx_L96_bool_binop_done;
        }
        if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 139, __pyx_L1_error) }
        __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 139, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
        __pyx_t_2 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_93, 93, 0)); if (unlikely((__pyx_t_2 < 0))) __PYX_ERR(0, 139, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __pyx_t_1 = __pyx_t_2;
        __pyx_L96_bool_binop_done:;
        if (__pyx_t_1) {
    /* … */
        }

    +140:                 i += 1

          __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +141:                 return res

          __Pyx_XDECREF(__pyx_r);
          __Pyx_INCREF(__pyx_v_res);
          __pyx_r = __pyx_v_res;
          goto __pyx_L0;

    +142:             while True:

        while (1) {

    +143:                 val = parse_value()

          if (unlikely(!__pyx_cur_scope->__pyx_v_parse_value)) { __Pyx_RaiseClosureNameError("parse_value"); __PYX_ERR(0, 143, __pyx_L1_error) }
          __pyx_t_3 = __pyx_pf_4rugo_5jsonl_23_parse_array_from_bytes_parse_value(__pyx_cur_scope->__pyx_v_parse_value); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 143, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_val, __pyx_t_3);
          __pyx_t_3 = 0;

    +144:                 res.append(val)

          __pyx_t_8 = __Pyx_PyList_Append(__pyx_v_res, __pyx_v_val); if (unlikely(__pyx_t_8 == ((int)-1))) __PYX_ERR(0, 144, __pyx_L1_error)

    +145:                 while i < n and b[i] in (32,9,10,13): i += 1

          while (1) {
            __pyx_t_2 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
            if (__pyx_t_2) {
            } else {
              __pyx_t_1 = __pyx_t_2;
              goto __pyx_L102_bool_binop_done;
            }
            if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 145, __pyx_L1_error) }
            __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 145, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_32, 32, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
            if (!__pyx_t_4) {
            } else {
              __pyx_t_2 = __pyx_t_4;
              goto __pyx_L104_bool_binop_done;
            }
            __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_9, 9, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
            if (!__pyx_t_4) {
            } else {
              __pyx_t_2 = __pyx_t_4;
              goto __pyx_L104_bool_binop_done;
            }
            __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_10, 10, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
            if (!__pyx_t_4) {
            } else {
              __pyx_t_2 = __pyx_t_4;
              goto __pyx_L104_bool_binop_done;
            }
            __pyx_t_4 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_13, 13, 0)); if (unlikely((__pyx_t_4 < 0))) __PYX_ERR(0, 145, __pyx_L1_error)
            __pyx_t_2 = __pyx_t_4;
            __pyx_L104_bool_binop_done:;
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __pyx_t_4 = __pyx_t_2;
            __pyx_t_1 = __pyx_t_4;
            __pyx_L102_bool_binop_done:;
            if (!__pyx_t_1) break;
            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
          }

    +146:                 if i >= n:

          __pyx_t_1 = (__pyx_cur_scope->__pyx_v_i >= __pyx_cur_scope->__pyx_v_n);
          if (unlikely(__pyx_t_1)) {
    /* … */
          }

    +147:                     raise ValueError('unterminated array')

            __pyx_t_5 = NULL;
            __Pyx_INCREF(__pyx_builtin_ValueError);
            __pyx_t_6 = __pyx_builtin_ValueError;
            __pyx_t_7 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_unterminated_array};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
              __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 147, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
            }
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 147, __pyx_L1_error)

    +148:                 if b[i] == 44:

          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 148, __pyx_L1_error) }
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 148, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_44, 44, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 148, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (__pyx_t_1) {
    /* … */
          }

    +149:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +150:                     continue

            goto __pyx_L98_continue;

    +151:                 elif b[i] == 93:

          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 151, __pyx_L1_error) }
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_93, 93, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 151, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
          if (likely(__pyx_t_1)) {
    /* … */
          }

    +152:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +153:                     break

            goto __pyx_L99_break;

     154:                 else:

    +155:                     raise ValueError('invalid array separator')

          /*else*/ {
            __pyx_t_6 = NULL;
            __Pyx_INCREF(__pyx_builtin_ValueError);
            __pyx_t_5 = __pyx_builtin_ValueError;
            __pyx_t_7 = 1;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_invalid_array_separator};
              __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
              if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 155, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
            }
            __Pyx_Raise(__pyx_t_3, 0, 0, 0);
            __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
            __PYX_ERR(0, 155, __pyx_L1_error)
          }
          __pyx_L98_continue:;
        }
        __pyx_L99_break:;

    +156:             return res

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(__pyx_v_res);
        __pyx_r = __pyx_v_res;
        goto __pyx_L0;

     157:

     158:         # object: return raw bytes slice for object

    +159:         if c == 123:  # '{'

      __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_c, __pyx_mstate_global->__pyx_int_123, 0x7B, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 159, __pyx_L1_error)
      if (__pyx_t_1) {
    /* … */
      }

    +160:             start = i

        __pyx_v_start = __pyx_cur_scope->__pyx_v_i;

    +161:             depth = 0

        __Pyx_INCREF(__pyx_mstate_global->__pyx_int_0);
        __pyx_v_depth = __pyx_mstate_global->__pyx_int_0;

    +162:             while i < n:

        while (1) {
          __pyx_t_1 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
          if (!__pyx_t_1) break;

    +163:                 ch = b[i]

          if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 163, __pyx_L1_error) }
          __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 163, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
          __Pyx_XDECREF_SET(__pyx_v_ch, __pyx_t_3);
          __pyx_t_3 = 0;

    +164:                 if ch == 34:

          __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_ch, __pyx_mstate_global->__pyx_int_34, 34, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 164, __pyx_L1_error)
          if (__pyx_t_1) {
    /* … */
          }

     165:                     # skip string

    +166:                     i += 1

            __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +167:                     while i < n:

            while (1) {
              __pyx_t_1 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
              if (!__pyx_t_1) break;

    +168:                         if b[i] == 92:

              if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 168, __pyx_L1_error) }
              __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 168, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_92, 92, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 168, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (__pyx_t_1) {
    /* … */
                goto __pyx_L116;
              }

    +169:                             i += 2

                __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 2);

    +170:                         elif b[i] == 34:

              if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 170, __pyx_L1_error) }
              __pyx_t_3 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 170, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_3, __pyx_mstate_global->__pyx_int_34, 34, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 170, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
              if (__pyx_t_1) {
    /* … */
              }

    +171:                             i += 1

                __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +172:                             break

                goto __pyx_L115_break;

     173:                         else:

    +174:                             i += 1

              /*else*/ {
                __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
              }
              __pyx_L116:;
            }
            __pyx_L115_break:;

    +175:                     continue

            goto __pyx_L111_continue;

    +176:                 if ch == 123:

          __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_ch, __pyx_mstate_global->__pyx_int_123, 0x7B, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 176, __pyx_L1_error)
          if (__pyx_t_1) {
    /* … */
            goto __pyx_L117;
          }

    +177:                     depth += 1

            __pyx_t_3 = __Pyx_PyLong_AddObjC(__pyx_v_depth, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 177, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF_SET(__pyx_v_depth, __pyx_t_3);
            __pyx_t_3 = 0;

    +178:                 elif ch == 125:

          __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_ch, __pyx_mstate_global->__pyx_int_125, 0x7D, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 178, __pyx_L1_error)
          if (__pyx_t_1) {
    /* … */
          }
          __pyx_L117:;

    +179:                     depth -= 1

            __pyx_t_3 = __Pyx_PyLong_SubtractObjC(__pyx_v_depth, __pyx_mstate_global->__pyx_int_1, 1, 1, 0); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 179, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_3);
            __Pyx_DECREF_SET(__pyx_v_depth, __pyx_t_3);
            __pyx_t_3 = 0;

    +180:                     if depth == 0:

            __pyx_t_1 = (__Pyx_PyLong_BoolEqObjC(__pyx_v_depth, __pyx_mstate_global->__pyx_int_0, 0, 0)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 180, __pyx_L1_error)
            if (__pyx_t_1) {
    /* … */
            }

    +181:                         i += 1

              __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);

    +182:                         return b[start:i]

              __Pyx_XDECREF(__pyx_r);
              if (unlikely(!__pyx_cur_scope->__pyx_v_b)) { __Pyx_RaiseClosureNameError("b"); __PYX_ERR(0, 182, __pyx_L1_error) }
              if (unlikely(__pyx_cur_scope->__pyx_v_b == Py_None)) {
                PyErr_SetString(PyExc_TypeError, "'NoneType' object is not subscriptable");
                __PYX_ERR(0, 182, __pyx_L1_error)
              }
              __pyx_t_3 = PySequence_GetSlice(__pyx_cur_scope->__pyx_v_b, __pyx_v_start, __pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 182, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_3);
              __pyx_r = __pyx_t_3;
              __pyx_t_3 = 0;
              goto __pyx_L0;

    +183:                 i += 1

          __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
          __pyx_L111_continue:;
        }

    +184:             raise ValueError('unterminated object')

        __pyx_t_5 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_6 = __pyx_builtin_ValueError;
        __pyx_t_7 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_5, __pyx_mstate_global->__pyx_kp_u_unterminated_object};
          __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_5); __pyx_t_5 = 0;
          __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
          if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 184, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_3);
        }
        __Pyx_Raise(__pyx_t_3, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
        __PYX_ERR(0, 184, __pyx_L1_error)

     185:

    +186:         raise ValueError('unexpected token at %d' % i)

      __pyx_t_6 = NULL;
      __Pyx_INCREF(__pyx_builtin_ValueError);
      __pyx_t_5 = __pyx_builtin_ValueError;
      __pyx_t_13 = PyLong_FromSsize_t(__pyx_cur_scope->__pyx_v_i); if (unlikely(!__pyx_t_13)) __PYX_ERR(0, 186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_13);
      __pyx_t_15 = PyUnicode_Format(__pyx_mstate_global->__pyx_kp_u_unexpected_token_at_d, __pyx_t_13); if (unlikely(!__pyx_t_15)) __PYX_ERR(0, 186, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_15);
      __Pyx_DECREF(__pyx_t_13); __pyx_t_13 = 0;
      __pyx_t_7 = 1;
      {
        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_15};
        __pyx_t_3 = __Pyx_PyObject_FastCall(__pyx_t_5, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (__pyx_t_7*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
        __Pyx_DECREF(__pyx_t_15); __pyx_t_15 = 0;
        __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
        if (unlikely(!__pyx_t_3)) __PYX_ERR(0, 186, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_3);
      }
      __Pyx_Raise(__pyx_t_3, 0, 0, 0);
      __Pyx_DECREF(__pyx_t_3); __pyx_t_3 = 0;
      __PYX_ERR(0, 186, __pyx_L1_error)

     187:

     188:     # top-level: expect '['

    +189:     while i < n and b[i] in (32,9,10,13): i += 1

      while (1) {
        __pyx_t_4 = (__pyx_cur_scope->__pyx_v_i < __pyx_cur_scope->__pyx_v_n);
        if (__pyx_t_4) {
        } else {
          __pyx_t_3 = __pyx_t_4;
          goto __pyx_L5_bool_binop_done;
        }
        __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 189, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_1);
        __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_32, 32, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 189, __pyx_L1_error)
        if (!__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_9, 9, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 189, __pyx_L1_error)
        if (!__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_10, 10, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 189, __pyx_L1_error)
        if (!__pyx_t_5) {
        } else {
          __pyx_t_4 = __pyx_t_5;
          goto __pyx_L7_bool_binop_done;
        }
        __pyx_t_5 = (__Pyx_PyLong_BoolEqObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_13, 13, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 189, __pyx_L1_error)
        __pyx_t_4 = __pyx_t_5;
        __pyx_L7_bool_binop_done:;
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __pyx_t_5 = __pyx_t_4;
        __pyx_t_3 = __pyx_t_5;
        __pyx_L5_bool_binop_done:;
        if (!__pyx_t_3) break;
        __pyx_cur_scope->__pyx_v_i = (__pyx_cur_scope->__pyx_v_i + 1);
      }

    +190:     if i >= n or b[i] != 91:

      __pyx_t_5 = (__pyx_cur_scope->__pyx_v_i >= __pyx_cur_scope->__pyx_v_n);
      if (!__pyx_t_5) {
      } else {
        __pyx_t_3 = __pyx_t_5;
        goto __pyx_L12_bool_binop_done;
      }
      __pyx_t_1 = __Pyx_GetItemInt(__pyx_cur_scope->__pyx_v_b, __pyx_cur_scope->__pyx_v_i, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_t_5 = (__Pyx_PyLong_BoolNeObjC(__pyx_t_1, __pyx_mstate_global->__pyx_int_91, 91, 0)); if (unlikely((__pyx_t_5 < 0))) __PYX_ERR(0, 190, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
      __pyx_t_3 = __pyx_t_5;
      __pyx_L12_bool_binop_done:;
      if (unlikely(__pyx_t_3)) {
    /* … */
      }

    +191:         raise ValueError('not an array')

        __pyx_t_6 = NULL;
        __Pyx_INCREF(__pyx_builtin_ValueError);
        __pyx_t_7 = __pyx_builtin_ValueError;
        __pyx_t_8 = 1;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_not_an_array};
          __pyx_t_1 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 191, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_1);
        }
        __Pyx_Raise(__pyx_t_1, 0, 0, 0);
        __Pyx_DECREF(__pyx_t_1); __pyx_t_1 = 0;
        __PYX_ERR(0, 191, __pyx_L1_error)

    +192:     return parse_value()

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = __pyx_pf_4rugo_5jsonl_23_parse_array_from_bytes_parse_value(__pyx_cur_scope->__pyx_v_parse_value); if (unlikely(!__pyx_t_1)) __PYX_ERR(0, 192, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_1);
      __pyx_r = __pyx_t_1;
      __pyx_t_1 = 0;
      goto __pyx_L0;

     193:

     194: cdef extern from "decode.hpp":

     195:     cdef enum JsonType:

     196:         pass

     197:     cdef cppclass ColumnSchema:

     198:         string name

     199:         JsonType type

     200:         bint nullable

     201:         JsonType element_type

     202:     cdef cppclass JsonlColumn:

     203:         vector[int64_t] int_values

     204:         vector[double] double_values

     205:         vector[string] string_values

     206:         vector[uint8_t] boolean_values

     207:         vector[uint8_t] null_mask

     208:         string type

     209:         bint success

     210:     cdef cppclass JsonlTable:

     211:         vector[JsonlColumn] columns

     212:         vector[string] column_names

     213:         size_t num_rows

     214:         bint success

     215:     vector[ColumnSchema] GetJsonlSchema(const uint8_t* data, size_t size, size_t sample_size) except +

     216:     JsonlTable ReadJsonl(const uint8_t* data, size_t size, const vector[string]& column_names) except +

     217:     JsonlTable ReadJsonl(const uint8_t* data, size_t size) except +

     218:     PyObject* ParseJsonSliceToPyObject(const uint8_t* data, size_t len, bint parse_objects)

     219:

    +220: def get_jsonl_schema(data, sample_size=25):

    /* Python wrapper */
    static PyObject *__pyx_pw_4rugo_5jsonl_3get_jsonl_schema(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_4rugo_5jsonl_2get_jsonl_schema, "\n    Infer the schema of a JSONL dataset from a sample of the data.\n\n    Parameters\n    ----------\n    data : bytes or object supporting the buffer protocol\n        The JSONL data to analyze.\n    sample_size : int, optional\n        The number of rows to sample for schema inference (default: 25).\n\n    Returns\n    -------\n    list of dict\n        A list of dictionaries, each describing a column with keys:\n        - 'name': str, the column name\n        - 'type': str, the inferred type ('null', 'boolean', 'int64', 'double', 'bytes')\n        - 'nullable': bool, whether the column can contain null values\n    ");
    static PyMethodDef __pyx_mdef_4rugo_5jsonl_3get_jsonl_schema = {"get_jsonl_schema", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4rugo_5jsonl_3get_jsonl_schema, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4rugo_5jsonl_2get_jsonl_schema};
    static PyObject *__pyx_pw_4rugo_5jsonl_3get_jsonl_schema(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_data = 0;
      PyObject *__pyx_v_sample_size = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("get_jsonl_schema (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_sample_size,0};
      PyObject* values[2] = {0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 220, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 220, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 220, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "get_jsonl_schema", 0) < (0)) __PYX_ERR(0, 220, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_25)));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("get_jsonl_schema", 0, 1, 2, i); __PYX_ERR(0, 220, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 220, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 220, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)((PyObject*)__pyx_mstate_global->__pyx_int_25)));
        }
        __pyx_v_data = values[0];
        __pyx_v_sample_size = values[1];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("get_jsonl_schema", 0, 1, 2, __pyx_nargs); __PYX_ERR(0, 220, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("rugo.jsonl.get_jsonl_schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_4rugo_5jsonl_2get_jsonl_schema(__pyx_self, __pyx_v_data, __pyx_v_sample_size);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_4rugo_5jsonl_2get_jsonl_schema(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_sample_size) {
      uint8_t const *__pyx_v_data_ptr;
      size_t __pyx_v_data_size;
      PyObject *__pyx_v_data_bytes = 0;
      Py_buffer __pyx_v_view;
      int __pyx_v_have_view;
      std::vector<ColumnSchema>  __pyx_v_schema;
      PyObject *__pyx_v_result = NULL;
      size_t __pyx_v_i;
      int __pyx_v_type_val;
      ColumnSchema __pyx_v_col;
      PyObject *__pyx_v_type_str = NULL;
      int __pyx_v_elem_val;
      PyObject *__pyx_r = NULL;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_6);
      __Pyx_XDECREF(__pyx_t_7);
      __Pyx_AddTraceback("rugo.jsonl.get_jsonl_schema", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_data_bytes);
      __Pyx_XDECREF(__pyx_v_result);
      __Pyx_XDECREF(__pyx_v_type_str);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4rugo_5jsonl_3get_jsonl_schema, 0, __pyx_mstate_global->__pyx_n_u_get_jsonl_schema, NULL, __pyx_mstate_global->__pyx_n_u_rugo_jsonl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[5])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[0]);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_get_jsonl_schema, __pyx_t_2) < (0)) __PYX_ERR(0, 220, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
    /* … */
      __pyx_mstate_global->__pyx_tuple[0] = PyTuple_Pack(1, ((PyObject*)__pyx_mstate_global->__pyx_int_25)); if (unlikely(!__pyx_mstate_global->__pyx_tuple[0])) __PYX_ERR(0, 220, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_tuple[0]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_tuple[0]);

     221:     """

     222:     Infer the schema of a JSONL dataset from a sample of the data.

     223:

     224:     Parameters

     225:     ----------

     226:     data : bytes or object supporting the buffer protocol

     227:         The JSONL data to analyze.

     228:     sample_size : int, optional

     229:         The number of rows to sample for schema inference (default: 25).

     230:

     231:     Returns

     232:     -------

     233:     list of dict

     234:         A list of dictionaries, each describing a column with keys:

     235:         - 'name': str, the column name

     236:         - 'type': str, the inferred type ('null', 'boolean', 'int64', 'double', 'bytes')

     237:         - 'nullable': bool, whether the column can contain null values

     238:     """

     239:     cdef const uint8_t* data_ptr

     240:     cdef size_t data_size

     241:     cdef bytes data_bytes

     242:     cdef Py_buffer view

    +243:     cdef bint have_view = False

      __pyx_v_have_view = 0;

    +244:     if isinstance(data, bytes):

      __pyx_t_1 = PyBytes_Check(__pyx_v_data);
      if (__pyx_t_1) {
    /* … */
        goto __pyx_L3;
      }

    +245:         data_bytes = <bytes>data

        __pyx_t_2 = __pyx_v_data;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_data_bytes = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

    +246:         data_ptr = <const uint8_t*>(<char*>data_bytes)

        if (unlikely(__pyx_v_data_bytes == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
          __PYX_ERR(0, 246, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_data_bytes); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 246, __pyx_L1_error)
        __pyx_v_data_ptr = ((uint8_t const *)((char *)__pyx_t_3));

    +247:         data_size = len(data_bytes)

        if (unlikely(__pyx_v_data_bytes == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(0, 247, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data_bytes); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 247, __pyx_L1_error)
        __pyx_v_data_size = __pyx_t_4;

     248:     else:

    +249:         if PyObject_GetBuffer(data, &view, PyBUF_CONTIG_RO) == -1:

      /*else*/ {
        __pyx_t_5 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_view), PyBUF_CONTIG_RO); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 249, __pyx_L1_error)
        __pyx_t_1 = (__pyx_t_5 == -1L);
        if (unlikely(__pyx_t_1)) {
    /* … */
        }

    +250:             raise TypeError("object does not support contiguous buffer interface")

          __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_builtin_TypeError);
          __pyx_t_7 = __pyx_builtin_TypeError;
          __pyx_t_8 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_object_does_not_support_contiguo};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 250, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(0, 250, __pyx_L1_error)

    +251:         have_view = True

        __pyx_v_have_view = 1;

    +252:         data_ptr = <const uint8_t*>view.buf

        __pyx_v_data_ptr = ((uint8_t const *)__pyx_v_view.buf);

    +253:         data_size = <size_t>view.len

        __pyx_v_data_size = ((size_t)__pyx_v_view.len);
      }
      __pyx_L3:;

    +254:     cdef vector[ColumnSchema] schema = GetJsonlSchema(data_ptr, data_size, sample_size)

      __pyx_t_8 = __Pyx_PyLong_As_size_t(__pyx_v_sample_size); if (unlikely((__pyx_t_8 == (size_t)-1) && PyErr_Occurred())) __PYX_ERR(0, 254, __pyx_L1_error)
      try {
        __pyx_t_9 = GetJsonlSchema(__pyx_v_data_ptr, __pyx_v_data_size, __pyx_t_8);
      } catch(...) {
        __Pyx_CppExn2PyErr();
        __PYX_ERR(0, 254, __pyx_L1_error)
      }
      __pyx_v_schema = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

    +255:     if have_view:

      if (__pyx_v_have_view) {
    /* … */
      }

    +256:         PyBuffer_Release(&view)

        PyBuffer_Release((&__pyx_v_view));

    +257:     result = []

      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 257, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_result = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

     258:     cdef size_t i

     259:     cdef int type_val

    +260:     for i in range(schema.size()):

      __pyx_t_10 = __pyx_v_schema.size();
      __pyx_t_11 = __pyx_t_10;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_11; __pyx_t_8+=1) {
        __pyx_v_i = __pyx_t_8;

    +261:         col = schema[i]

        __pyx_v_col = (__pyx_v_schema[__pyx_v_i]);

    +262:         type_val = <int>col.type

        __pyx_v_type_val = ((int)__pyx_v_col.type);

    +263:         type_str = "string"

        __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_string);
        __Pyx_XDECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_n_u_string);

     264:         # JsonType enum: Null=0, Boolean=1, Integer=2, Double=3, String=4, Array=5, Object=6

    +265:         if type_val == 0:

        switch (__pyx_v_type_val) {
          case 0:
    /* … */
          break;
          case 1:

    +266:             type_str = "null"

          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_null);
          __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_n_u_null);

    +267:         elif type_val == 1:

          break;
          case 2:

    +268:             type_str = "boolean"

          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_boolean);
          __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_n_u_boolean);

    +269:         elif type_val == 2:

          break;
          case 3:

    +270:             type_str = "int64"

          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_int64);
          __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_n_u_int64);

    +271:         elif type_val == 3:

          break;
          case 4:

    +272:             type_str = "double"

          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_double);
          __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_n_u_double);

    +273:         elif type_val == 4:

          break;
          case 5:

    +274:             type_str = "string"

          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_string);
          __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_n_u_string);

    +275:         elif type_val == 5:

          break;
          case 6:

     276:             # array: include element type if available

    +277:             elem_val = <int>col.element_type

          __pyx_v_elem_val = ((int)__pyx_v_col.element_type);

    +278:             if elem_val == 2:

          switch (__pyx_v_elem_val) {
            case 2:
    /* … */
            break;
            case 3:

    +279:                 type_str = "array<int64>"

            __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_array_int64);
            __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_kp_u_array_int64);

    +280:             elif elem_val == 3:

            break;
            case 4:

    +281:                 type_str = "array<double>"

            __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_array_double);
            __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_kp_u_array_double);

    +282:             elif elem_val == 4:

            break;
            default:

    +283:                 type_str = "array<bytes>"

            __Pyx_INCREF(__pyx_mstate_global->__pyx_kp_u_array_bytes);
            __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_kp_u_array_bytes);

     284:             else:

    +285:                 type_str = "array"

            __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_array);
            __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_n_u_array);
            break;
          }

    +286:         elif type_val == 6:

          break;
          default: break;
        }

    +287:             type_str = "object"

          __Pyx_INCREF(__pyx_mstate_global->__pyx_n_u_object);
          __Pyx_DECREF_SET(__pyx_v_type_str, __pyx_mstate_global->__pyx_n_u_object);

    +288:         result.append({

        __pyx_t_12 = __Pyx_PyList_Append(__pyx_v_result, __pyx_t_2); if (unlikely(__pyx_t_12 == ((int)-1))) __PYX_ERR(0, 288, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

    +289:             'name': col.name.decode('utf-8'),

        __pyx_t_2 = __Pyx_PyDict_NewPresized(3); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_7 = __Pyx_decode_cpp_string(__pyx_v_col.name, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 289, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_name, __pyx_t_7) < (0)) __PYX_ERR(0, 289, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    +290:             'type': type_str,

        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_type, __pyx_v_type_str) < (0)) __PYX_ERR(0, 289, __pyx_L1_error)

    +291:             'nullable': col.nullable

        __pyx_t_7 = __Pyx_PyBool_FromLong(__pyx_v_col.nullable); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 291, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_nullable, __pyx_t_7) < (0)) __PYX_ERR(0, 289, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

     292:         })

    +293:     return result

      __Pyx_XDECREF(__pyx_r);
      __Pyx_INCREF(__pyx_v_result);
      __pyx_r = __pyx_v_result;
      goto __pyx_L0;

     294:

     295:

    +296: def read_jsonl(data, columns=None, parse_arrays=True, parse_objects=True):

    /* Python wrapper */
    static PyObject *__pyx_pw_4rugo_5jsonl_5read_jsonl(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    PyDoc_STRVAR(__pyx_doc_4rugo_5jsonl_4read_jsonl, "\n    Reads a JSONL (JSON Lines) dataset and returns its contents in a columnar format.\n\n    Parameters\n    ----------\n    data : bytes or object supporting buffer protocol\n        The JSONL data to read. Can be a bytes object or any object supporting the buffer protocol.\n    columns : list of str, optional\n        List of column names to read. If None, all columns are read.\n\n    Returns\n    -------\n    dict\n        A dictionary with the following keys:\n            - 'success': bool, True if reading was successful.\n            - 'column_names': list of str, names of the columns.\n            - 'num_rows': int, number of rows in the dataset.\n            - 'columns': list, each element is a list of values for a column (with None for nulls), or None if the column failed to read.\n    ");
    static PyMethodDef __pyx_mdef_4rugo_5jsonl_5read_jsonl = {"read_jsonl", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4rugo_5jsonl_5read_jsonl, __Pyx_METH_FASTCALL|METH_KEYWORDS, __pyx_doc_4rugo_5jsonl_4read_jsonl};
    static PyObject *__pyx_pw_4rugo_5jsonl_5read_jsonl(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_data = 0;
      PyObject *__pyx_v_columns = 0;
      PyObject *__pyx_v_parse_arrays = 0;
      CYTHON_UNUSED PyObject *__pyx_v_parse_objects = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("read_jsonl (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_data,&__pyx_mstate_global->__pyx_n_u_columns,&__pyx_mstate_global->__pyx_n_u_parse_arrays,&__pyx_mstate_global->__pyx_n_u_parse_objects,0};
      PyObject* values[4] = {0,0,0,0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 296, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 296, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 296, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 296, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 296, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "read_jsonl", 0) < (0)) __PYX_ERR(0, 296, __pyx_L3_error)
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("read_jsonl", 0, 1, 4, i); __PYX_ERR(0, 296, __pyx_L3_error) }
          }
        } else {
          switch (__pyx_nargs) {
            case  4:
            values[3] = __Pyx_ArgRef_FASTCALL(__pyx_args, 3);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[3])) __PYX_ERR(0, 296, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  3:
            values[2] = __Pyx_ArgRef_FASTCALL(__pyx_args, 2);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[2])) __PYX_ERR(0, 296, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  2:
            values[1] = __Pyx_ArgRef_FASTCALL(__pyx_args, 1);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[1])) __PYX_ERR(0, 296, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 296, __pyx_L3_error)
            break;
            default: goto __pyx_L5_argtuple_error;
          }
          if (!values[1]) values[1] = __Pyx_NewRef(((PyObject *)Py_None));
          if (!values[2]) values[2] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
          if (!values[3]) values[3] = __Pyx_NewRef(((PyObject *)((PyObject*)Py_True)));
        }
        __pyx_v_data = values[0];
        __pyx_v_columns = values[1];
        __pyx_v_parse_arrays = values[2];
        __pyx_v_parse_objects = values[3];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("read_jsonl", 0, 1, 4, __pyx_nargs); __PYX_ERR(0, 296, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("rugo.jsonl.read_jsonl", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_4rugo_5jsonl_4read_jsonl(__pyx_self, __pyx_v_data, __pyx_v_columns, __pyx_v_parse_arrays, __pyx_v_parse_objects);

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
    static PyObject *__pyx_pf_4rugo_5jsonl_4read_jsonl(CYTHON_UNUSED PyObject *__pyx_self, PyObject *__pyx_v_data, PyObject *__pyx_v_columns, PyObject *__pyx_v_parse_arrays, CYTHON_UNUSED PyObject *__pyx_v_parse_objects) {
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *__pyx_cur_scope;
      uint8_t const *__pyx_v_data_ptr;
      size_t __pyx_v_data_size;
      PyObject *__pyx_v_data_bytes = 0;
      Py_buffer __pyx_v_view;
      int __pyx_v_have_view;
      std::vector<std::string>  __pyx_v_column_names_vec;
      JsonlTable __pyx_v_table;
      PyObject *__pyx_v_col_name = NULL;
      PyObject *__pyx_v_py_column_names = NULL;
      size_t __pyx_v_i;
      PyObject *__pyx_v_py_columns = NULL;
      PyObject *__pyx_v_o = NULL;
      PyObject *__pyx_v_o_ptr;
      JsonlColumn *__pyx_v_col;
      PyObject *__pyx_v_col_type = NULL;
      PyObject *__pyx_v_py_list = NULL;
      std::vector<std::string> ::size_type __pyx_v_j;
      std::string __pyx_v_raw;
      PyObject *__pyx_v_py_obj = NULL;
      PyObject *__pyx_v_elem_type = NULL;
      PyObject *__pyx_v_parsed = NULL;
      char __pyx_v_first;
      PyObject *__pyx_r = NULL;
      __pyx_cur_scope = (struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *)__pyx_tp_new_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl(__pyx_mstate_global->__pyx_ptype_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl, __pyx_mstate_global->__pyx_empty_tuple, NULL);
      if (unlikely(!__pyx_cur_scope)) {
        __pyx_cur_scope = ((struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *)Py_None);
        __Pyx_INCREF(Py_None);
        __PYX_ERR(0, 296, __pyx_L1_error)
      } else {
        __Pyx_GOTREF((PyObject *)__pyx_cur_scope);
      }
    /* … */
      __pyx_t_2 = __Pyx_CyFunction_New(&__pyx_mdef_4rugo_5jsonl_5read_jsonl, 0, __pyx_mstate_global->__pyx_n_u_read_jsonl, NULL, __pyx_mstate_global->__pyx_n_u_rugo_jsonl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[6])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 296, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __Pyx_CyFunction_SetDefaultsTuple(__pyx_t_2, __pyx_mstate_global->__pyx_tuple[1]);
      if (PyDict_SetItem(__pyx_mstate_global->__pyx_d, __pyx_mstate_global->__pyx_n_u_read_jsonl, __pyx_t_2) < (0)) __PYX_ERR(0, 296, __pyx_L1_error)
      __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

     297:     """

     298:     Reads a JSONL (JSON Lines) dataset and returns its contents in a columnar format.

     299:

     300:     Parameters

     301:     ----------

     302:     data : bytes or object supporting buffer protocol

     303:         The JSONL data to read. Can be a bytes object or any object supporting the buffer protocol.

     304:     columns : list of str, optional

     305:         List of column names to read. If None, all columns are read.

     306:

     307:     Returns

     308:     -------

     309:     dict

     310:         A dictionary with the following keys:

     311:             - 'success': bool, True if reading was successful.

     312:             - 'column_names': list of str, names of the columns.

     313:             - 'num_rows': int, number of rows in the dataset.

     314:             - 'columns': list, each element is a list of values for a column (with None for nulls), or None if the column failed to read.

     315:     """

     316:     cdef const uint8_t* data_ptr

     317:     cdef size_t data_size

     318:     cdef bytes data_bytes

     319:     cdef Py_buffer view

    +320:     cdef bint have_view = False

      __pyx_v_have_view = 0;

    +321:     if isinstance(data, bytes):

      __pyx_t_1 = PyBytes_Check(__pyx_v_data);
      if (__pyx_t_1) {
    /* … */
        goto __pyx_L3;
      }

    +322:         data_bytes = <bytes>data

        __pyx_t_2 = __pyx_v_data;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_v_data_bytes = ((PyObject*)__pyx_t_2);
        __pyx_t_2 = 0;

    +323:         data_ptr = <const uint8_t*>(<char*>data_bytes)

        if (unlikely(__pyx_v_data_bytes == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "expected bytes, NoneType found");
          __PYX_ERR(0, 323, __pyx_L1_error)
        }
        __pyx_t_3 = __Pyx_PyBytes_AsWritableString(__pyx_v_data_bytes); if (unlikely((!__pyx_t_3) && PyErr_Occurred())) __PYX_ERR(0, 323, __pyx_L1_error)
        __pyx_v_data_ptr = ((uint8_t const *)((char *)__pyx_t_3));

    +324:         data_size = len(data_bytes)

        if (unlikely(__pyx_v_data_bytes == Py_None)) {
          PyErr_SetString(PyExc_TypeError, "object of type 'NoneType' has no len()");
          __PYX_ERR(0, 324, __pyx_L1_error)
        }
        __pyx_t_4 = __Pyx_PyBytes_GET_SIZE(__pyx_v_data_bytes); if (unlikely(__pyx_t_4 == ((Py_ssize_t)-1))) __PYX_ERR(0, 324, __pyx_L1_error)
        __pyx_v_data_size = __pyx_t_4;

     325:     else:

    +326:         if PyObject_GetBuffer(data, &view, PyBUF_CONTIG_RO) == -1:

      /*else*/ {
        __pyx_t_5 = PyObject_GetBuffer(__pyx_v_data, (&__pyx_v_view), PyBUF_CONTIG_RO); if (unlikely(__pyx_t_5 == ((int)-1))) __PYX_ERR(0, 326, __pyx_L1_error)
        __pyx_t_1 = (__pyx_t_5 == -1L);
        if (unlikely(__pyx_t_1)) {
    /* … */
        }

    +327:             raise TypeError("object does not support contiguous buffer interface")

          __pyx_t_6 = NULL;
          __Pyx_INCREF(__pyx_builtin_TypeError);
          __pyx_t_7 = __pyx_builtin_TypeError;
          __pyx_t_8 = 1;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_object_does_not_support_contiguo};
            __pyx_t_2 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (__pyx_t_8*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
            if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 327, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
          }
          __Pyx_Raise(__pyx_t_2, 0, 0, 0);
          __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
          __PYX_ERR(0, 327, __pyx_L1_error)

    +328:         have_view = True

        __pyx_v_have_view = 1;

    +329:         data_ptr = <const uint8_t*>view.buf

        __pyx_v_data_ptr = ((uint8_t const *)__pyx_v_view.buf);

    +330:         data_size = <size_t>view.len

        __pyx_v_data_size = ((size_t)__pyx_v_view.len);
      }
      __pyx_L3:;

     331:     cdef vector[string] column_names_vec

     332:     cdef JsonlTable table

    +333:     if columns is None:

      __pyx_t_1 = (__pyx_v_columns == Py_None);
      if (__pyx_t_1) {
    /* … */
        goto __pyx_L5;
      }

    +334:         table = ReadJsonl(data_ptr, data_size)

        try {
          __pyx_t_9 = ReadJsonl(__pyx_v_data_ptr, __pyx_v_data_size);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(0, 334, __pyx_L1_error)
        }
        __pyx_v_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);

     335:     else:

    +336:         for col_name in columns:

      /*else*/ {
        if (likely(PyList_CheckExact(__pyx_v_columns)) || PyTuple_CheckExact(__pyx_v_columns)) {
          __pyx_t_2 = __pyx_v_columns; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_4 = 0;
          __pyx_t_10 = NULL;
        } else {
          __pyx_t_4 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_columns); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 336, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_10 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_10)) __PYX_ERR(0, 336, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_10)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 336, __pyx_L1_error)
                #endif
                if (__pyx_t_4 >= __pyx_temp) break;
              }
              __pyx_t_7 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_4);
              ++__pyx_t_4;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 336, __pyx_L1_error)
                #endif
                if (__pyx_t_4 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_7 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_4));
              #else
              __pyx_t_7 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_4);
              #endif
              ++__pyx_t_4;
            }
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 336, __pyx_L1_error)
          } else {
            __pyx_t_7 = __pyx_t_10(__pyx_t_2);
            if (unlikely(!__pyx_t_7)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 336, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_XDECREF_SET(__pyx_v_col_name, __pyx_t_7);
          __pyx_t_7 = 0;
    /* … */
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +337:             column_names_vec.push_back(col_name.encode('utf-8'))

          __pyx_t_6 = __pyx_v_col_name;
          __Pyx_INCREF(__pyx_t_6);
          __pyx_t_8 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_utf_8};
            __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_8, (2-__pyx_t_8) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 337, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __pyx_t_11 = __pyx_convert_string_from_py_6libcpp_6string_std__in_string(__pyx_t_7); if (unlikely(PyErr_Occurred())) __PYX_ERR(0, 337, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          try {
            __pyx_v_column_names_vec.push_back(__pyx_t_11);
          } catch(...) {
            __Pyx_CppExn2PyErr();
            __PYX_ERR(0, 337, __pyx_L1_error)
          }

    +338:         table = ReadJsonl(data_ptr, data_size, column_names_vec)

        try {
          __pyx_t_9 = ReadJsonl(__pyx_v_data_ptr, __pyx_v_data_size, __pyx_v_column_names_vec);
        } catch(...) {
          __Pyx_CppExn2PyErr();
          __PYX_ERR(0, 338, __pyx_L1_error)
        }
        __pyx_v_table = __PYX_STD_MOVE_IF_SUPPORTED(__pyx_t_9);
      }
      __pyx_L5:;

    +339:     if have_view:

      if (__pyx_v_have_view) {
    /* … */
      }

    +340:         PyBuffer_Release(&view)

        PyBuffer_Release((&__pyx_v_view));

    +341:     if not table.success:

      __pyx_t_1 = (!__pyx_v_table.success);
      if (__pyx_t_1) {
    /* … */
      }

    +342:         return {

        __Pyx_XDECREF(__pyx_r);

    +343:             'success': False,

        __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 343, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_success, Py_False) < (0)) __PYX_ERR(0, 343, __pyx_L1_error)

    +344:             'column_names': [],

        __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 344, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_column_names, __pyx_t_7) < (0)) __PYX_ERR(0, 343, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_num_rows, __pyx_mstate_global->__pyx_int_0) < (0)) __PYX_ERR(0, 343, __pyx_L1_error)

     345:             'num_rows': 0,

    +346:             'columns': []

        __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 346, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_columns, __pyx_t_7) < (0)) __PYX_ERR(0, 343, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

     347:         }

    +348:     py_column_names = []

      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 348, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_py_column_names = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

     349:     cdef size_t i

    +350:     for i in range(table.column_names.size()):

      __pyx_t_12 = __pyx_v_table.column_names.size();
      __pyx_t_13 = __pyx_t_12;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_13; __pyx_t_8+=1) {
        __pyx_v_i = __pyx_t_8;

    +351:         py_column_names.append(table.column_names[i].decode('utf-8'))

        __pyx_t_2 = __Pyx_decode_cpp_string((__pyx_v_table.column_names[__pyx_v_i]), 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 351, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_column_names, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 351, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
      }

    +352:     py_columns = []

      __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 352, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_v_py_columns = ((PyObject*)__pyx_t_2);
      __pyx_t_2 = 0;

     353:     # Python-level temporary for simdjson results

    +354:     o = None

      __Pyx_INCREF(Py_None);
      __pyx_v_o = Py_None;

     355:     cdef PyObject* o_ptr

     356:     cdef JsonlColumn* col

    +357:     for i in range(table.columns.size()):

      __pyx_t_15 = __pyx_v_table.columns.size();
      __pyx_t_16 = __pyx_t_15;
      for (__pyx_t_8 = 0; __pyx_t_8 < __pyx_t_16; __pyx_t_8+=1) {
        __pyx_v_i = __pyx_t_8;

    +358:         col = &table.columns[i]

        __pyx_v_col = (&(__pyx_v_table.columns[__pyx_v_i]));

    +359:         if not col.success:

        __pyx_t_1 = (!__pyx_v_col->success);
        if (__pyx_t_1) {
    /* … */
        }

    +360:             py_columns.append(None)

          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_columns, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 360, __pyx_L1_error)

    +361:             continue

          goto __pyx_L13_continue;

    +362:         col_type = col.type.decode('utf-8')

        __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_v_col->type, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 362, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        __Pyx_XDECREF_SET(__pyx_v_col_type, __pyx_t_2);
        __pyx_t_2 = 0;

    +363:         if col_type == 'int64':

        __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_col_type, __pyx_mstate_global->__pyx_n_u_int64, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 363, __pyx_L1_error)
        if (__pyx_t_1) {
    /* … */
          goto __pyx_L16;
        }

    +364:             py_list = []

          __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 364, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_py_list, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

    +365:             for j in range(col.int_values.size()):

          __pyx_t_17 = __pyx_v_col->int_values.size();
          __pyx_t_18 = __pyx_t_17;
          for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_18; __pyx_t_12+=1) {
            __pyx_v_j = __pyx_t_12;

    +366:                 if col.null_mask[j]:

            __pyx_t_1 = ((__pyx_v_col->null_mask[__pyx_v_j]) != 0);
            if (__pyx_t_1) {
    /* … */
              goto __pyx_L19;
            }

    +367:                     py_list.append(None)

              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 367, __pyx_L1_error)

     368:                 else:

    +369:                     py_list.append(col.int_values[j])

            /*else*/ {
              __pyx_t_2 = __Pyx_PyLong_From_int64_t((__pyx_v_col->int_values[__pyx_v_j])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 369, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 369, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __pyx_L19:;
          }

    +370:             py_columns.append(py_list)

          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_columns, __pyx_v_py_list); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 370, __pyx_L1_error)

    +371:         elif col_type == 'double':

        __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_col_type, __pyx_mstate_global->__pyx_n_u_double, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 371, __pyx_L1_error)
        if (__pyx_t_1) {
    /* … */
          goto __pyx_L16;
        }

    +372:             py_list = []

          __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 372, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_py_list, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

    +373:             for j in range(col.double_values.size()):

          __pyx_t_19 = __pyx_v_col->double_values.size();
          __pyx_t_20 = __pyx_t_19;
          for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_20; __pyx_t_12+=1) {
            __pyx_v_j = __pyx_t_12;

    +374:                 if col.null_mask[j]:

            __pyx_t_1 = ((__pyx_v_col->null_mask[__pyx_v_j]) != 0);
            if (__pyx_t_1) {
    /* … */
              goto __pyx_L22;
            }

    +375:                     py_list.append(None)

              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 375, __pyx_L1_error)

     376:                 else:

    +377:                     py_list.append(col.double_values[j])

            /*else*/ {
              __pyx_t_2 = PyFloat_FromDouble((__pyx_v_col->double_values[__pyx_v_j])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 377, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_2);
              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 377, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            }
            __pyx_L22:;
          }

    +378:             py_columns.append(py_list)

          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_columns, __pyx_v_py_list); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 378, __pyx_L1_error)

    +379:         elif col_type == 'string' or col_type == 'bytes':

        __pyx_t_21 = (__Pyx_PyUnicode_Equals(__pyx_v_col_type, __pyx_mstate_global->__pyx_n_u_string, Py_EQ)); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 379, __pyx_L1_error)
        if (!__pyx_t_21) {
        } else {
          __pyx_t_1 = __pyx_t_21;
          goto __pyx_L23_bool_binop_done;
        }
        __pyx_t_21 = (__Pyx_PyUnicode_Equals(__pyx_v_col_type, __pyx_mstate_global->__pyx_n_u_bytes, Py_EQ)); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 379, __pyx_L1_error)
        __pyx_t_1 = __pyx_t_21;
        __pyx_L23_bool_binop_done:;
        if (__pyx_t_1) {
    /* … */
          goto __pyx_L16;
        }

     380:             # Bytes columns: return as bytes (binary data), do NOT parse as JSON

     381:             # The schema has already determined this is a bytes/string column, not array/object

    +382:             py_list = []

          __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 382, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __Pyx_XDECREF_SET(__pyx_v_py_list, ((PyObject*)__pyx_t_2));
          __pyx_t_2 = 0;

    +383:             for j in range(col.string_values.size()):

          __pyx_t_12 = __pyx_v_col->string_values.size();
          __pyx_t_13 = __pyx_t_12;
          for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_13; __pyx_t_22+=1) {
            __pyx_v_j = __pyx_t_22;

    +384:                 if col.null_mask[j]:

            __pyx_t_1 = ((__pyx_v_col->null_mask[__pyx_v_j]) != 0);
            if (__pyx_t_1) {
    /* … */
            }

    +385:                     py_list.append(None)

              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 385, __pyx_L1_error)

    +386:                     continue

              goto __pyx_L25_continue;

     387:

    +388:                 raw = col.string_values[j]

            __pyx_v_raw = (__pyx_v_col->string_values[__pyx_v_j]);

    +389:                 if raw.size() == 0:

            __pyx_t_1 = (__pyx_v_raw.size() == 0);
            if (__pyx_t_1) {
    /* … */
            }

    +390:                     py_list.append(b'')

              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_mstate_global->__pyx_kp_b_); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 390, __pyx_L1_error)

    +391:                     continue

              goto __pyx_L25_continue;

     392:

     393:                 # Always return as bytes, never parse as JSON

    +394:                 py_obj = <object>PyBytes_FromStringAndSize(<const char*>raw.data(), <Py_ssize_t>raw.size())

            __pyx_t_2 = PyBytes_FromStringAndSize(((char const *)__pyx_v_raw.data()), ((Py_ssize_t)__pyx_v_raw.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 394, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __pyx_t_7 = __pyx_t_2;
            __Pyx_INCREF(__pyx_t_7);
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            __Pyx_XDECREF_SET(__pyx_v_py_obj, __pyx_t_7);
            __pyx_t_7 = 0;

    +395:                 if py_obj is not None:

            __pyx_t_1 = (__pyx_v_py_obj != Py_None);
            if (__pyx_t_1) {
    /* … */
              goto __pyx_L29;
            }

    +396:                     py_list.append(py_obj)

              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_v_py_obj); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 396, __pyx_L1_error)

     397:                 else:

    +398:                     py_list.append(b'')

            /*else*/ {
              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_mstate_global->__pyx_kp_b_); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 398, __pyx_L1_error)
            }
            __pyx_L29:;
            __pyx_L25_continue:;
          }

    +399:             py_columns.append(py_list)

          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_columns, __pyx_v_py_list); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 399, __pyx_L1_error)

    +400:         elif col_type.startswith('array'):

        __pyx_t_2 = __pyx_v_col_type;
        __Pyx_INCREF(__pyx_t_2);
        __pyx_t_23 = 0;
        {
          PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_n_u_array};
          __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_startswith, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
          __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
          if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 400, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
        }
        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 400, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
        if (__pyx_t_1) {
    /* … */
          goto __pyx_L16;
        }

     401:             # Array columns: may be annotated as array<elemtype>

     402:             # Determine element type if provided (e.g. array<bytes>)

    +403:             elem_type = None

          __Pyx_INCREF(Py_None);
          __Pyx_XDECREF_SET(__pyx_v_elem_type, Py_None);

    +404:             if col_type.startswith('array<') and col_type.endswith('>'):

          __pyx_t_2 = __pyx_v_col_type;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_23 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u_array_2};
            __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_startswith, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 404, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 404, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          if (__pyx_t_21) {
          } else {
            __pyx_t_1 = __pyx_t_21;
            goto __pyx_L31_bool_binop_done;
          }
          __pyx_t_2 = __pyx_v_col_type;
          __Pyx_INCREF(__pyx_t_2);
          __pyx_t_23 = 0;
          {
            PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_mstate_global->__pyx_kp_u__11};
            __pyx_t_7 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_endswith, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
            __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
            if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 404, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
          }
          __pyx_t_21 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_21 < 0))) __PYX_ERR(0, 404, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
          __pyx_t_1 = __pyx_t_21;
          __pyx_L31_bool_binop_done:;
          if (__pyx_t_1) {
    /* … */
          }

    +405:                 elem_type = col_type[6:-1]

            __pyx_t_7 = __Pyx_PyObject_GetSlice(__pyx_v_col_type, 6, -1L, NULL, NULL, &__pyx_mstate_global->__pyx_slice[0], 1, 1, 0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 405, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_7);
            __Pyx_DECREF_SET(__pyx_v_elem_type, __pyx_t_7);
            __pyx_t_7 = 0;
    /* … */
      __pyx_mstate_global->__pyx_slice[0] = PySlice_New(__pyx_mstate_global->__pyx_int_6, __pyx_mstate_global->__pyx_int_neg_1, Py_None); if (unlikely(!__pyx_mstate_global->__pyx_slice[0])) __PYX_ERR(0, 405, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_mstate_global->__pyx_slice[0]);
      __Pyx_GIVEREF(__pyx_mstate_global->__pyx_slice[0]);

     406:

    +407:             def _convert_strings_to_bytes_inplace(obj):

    /* Python wrapper */
    static PyObject *__pyx_pw_4rugo_5jsonl_10read_jsonl_1_convert_strings_to_bytes_inplace(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_4rugo_5jsonl_10read_jsonl_1_convert_strings_to_bytes_inplace = {"_convert_strings_to_bytes_inplace", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4rugo_5jsonl_10read_jsonl_1_convert_strings_to_bytes_inplace, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_4rugo_5jsonl_10read_jsonl_1_convert_strings_to_bytes_inplace(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_obj = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_convert_strings_to_bytes_inplace (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_obj,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 407, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 407, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_convert_strings_to_bytes_inplace", 0) < (0)) __PYX_ERR(0, 407, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_convert_strings_to_bytes_inplace", 1, 1, 1, i); __PYX_ERR(0, 407, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 407, __pyx_L3_error)
        }
        __pyx_v_obj = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_convert_strings_to_bytes_inplace", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 407, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("rugo.jsonl.read_jsonl._convert_strings_to_bytes_inplace", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_4rugo_5jsonl_10read_jsonl__convert_strings_to_bytes_inplace(__pyx_self, __pyx_v_obj);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_4rugo_5jsonl_10read_jsonl__convert_strings_to_bytes_inplace(PyObject *__pyx_self, PyObject *__pyx_v_obj) {
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *__pyx_cur_scope;
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *__pyx_outer_scope;
      Py_ssize_t __pyx_v_idx;
      PyObject *__pyx_v_v = NULL;
      PyObject *__pyx_r = NULL;
      __pyx_outer_scope = (struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *) __Pyx_CyFunction_GetClosure(__pyx_self);
      __pyx_cur_scope = __pyx_outer_scope;
    /* … */
      /* function exit code */
      __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_AddTraceback("rugo.jsonl.read_jsonl._convert_strings_to_bytes_inplace", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_v);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
          __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_4rugo_5jsonl_10read_jsonl_1_convert_strings_to_bytes_inplace, 0, __pyx_mstate_global->__pyx_n_u_read_jsonl_locals__convert_strin, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_rugo_jsonl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[1])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 407, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__convert_strings_to_bytes_inplace);
          __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__convert_strings_to_bytes_inplace, __pyx_t_7);
          __Pyx_GIVEREF(__pyx_t_7);
          __pyx_t_7 = 0;

     408:                 # Recursively convert str elements in lists to bytes when elem_type == 'bytes'

     409:                 # obj is a Python object returned from the parser

    +410:                 if isinstance(obj, list):

      __pyx_t_1 = PyList_Check(__pyx_v_obj);
      if (__pyx_t_1) {
    /* … */
      }

    +411:                     for idx in range(len(obj)):

        __pyx_t_2 = PyObject_Length(__pyx_v_obj); if (unlikely(__pyx_t_2 == ((Py_ssize_t)-1))) __PYX_ERR(0, 411, __pyx_L1_error)
        __pyx_t_3 = __pyx_t_2;
        for (__pyx_t_4 = 0; __pyx_t_4 < __pyx_t_3; __pyx_t_4+=1) {
          __pyx_v_idx = __pyx_t_4;

    +412:                         v = obj[idx]

          __pyx_t_5 = __Pyx_GetItemInt(__pyx_v_obj, __pyx_v_idx, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 412, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_v, __pyx_t_5);
          __pyx_t_5 = 0;

    +413:                         if isinstance(v, str):

          __pyx_t_1 = PyUnicode_Check(__pyx_v_v);
          if (__pyx_t_1) {
    /* … */
            goto __pyx_L6;
          }

    +414:                             obj[idx] = v.encode('utf-8')

            __pyx_t_6 = __pyx_v_v;
            __Pyx_INCREF(__pyx_t_6);
            __pyx_t_7 = 0;
            {
              PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_mstate_global->__pyx_kp_u_utf_8};
              __pyx_t_5 = __Pyx_PyObject_FastCallMethod(__pyx_mstate_global->__pyx_n_u_encode, __pyx_callargs+__pyx_t_7, (2-__pyx_t_7) | (1*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
              __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
              if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 414, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_5);
            }
            if (unlikely((__Pyx_SetItemInt(__pyx_v_obj, __pyx_v_idx, __pyx_t_5, Py_ssize_t, 1, PyLong_FromSsize_t, 0, 0, 0, 1) < 0))) __PYX_ERR(0, 414, __pyx_L1_error)
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

    +415:                         elif isinstance(v, list):

          __pyx_t_1 = PyList_Check(__pyx_v_v);
          if (__pyx_t_1) {
    /* … */
          }
          __pyx_L6:;
        }

    +416:                             _convert_strings_to_bytes_inplace(v)

            if (unlikely(!__pyx_cur_scope->__pyx_v__convert_strings_to_bytes_inplace)) { __Pyx_RaiseClosureNameError("_convert_strings_to_bytes_inplace"); __PYX_ERR(0, 416, __pyx_L1_error) }
            __pyx_t_5 = __pyx_pf_4rugo_5jsonl_10read_jsonl__convert_strings_to_bytes_inplace(__pyx_cur_scope->__pyx_v__convert_strings_to_bytes_inplace, __pyx_v_v); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 416, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_5);
            __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;

     417:                         # leave dicts/bytes as-is

     418:

    +419:             py_list = []

          __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 419, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_7);
          __Pyx_XDECREF_SET(__pyx_v_py_list, ((PyObject*)__pyx_t_7));
          __pyx_t_7 = 0;

    +420:             for j in range(col.string_values.size()):

          __pyx_t_12 = __pyx_v_col->string_values.size();
          __pyx_t_13 = __pyx_t_12;
          for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_13; __pyx_t_22+=1) {
            __pyx_v_j = __pyx_t_22;

    +421:                 if col.null_mask[j]:

            __pyx_t_1 = ((__pyx_v_col->null_mask[__pyx_v_j]) != 0);
            if (__pyx_t_1) {
    /* … */
            }

    +422:                     py_list.append(None)

              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 422, __pyx_L1_error)

    +423:                     continue

              goto __pyx_L33_continue;

     424:

    +425:                 raw = col.string_values[j]

            __pyx_v_raw = (__pyx_v_col->string_values[__pyx_v_j]);

    +426:                 if raw.size() == 0:

            __pyx_t_1 = (__pyx_v_raw.size() == 0);
            if (__pyx_t_1) {
    /* … */
            }

    +427:                     py_list.append([])

              __pyx_t_7 = PyList_New(0); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 427, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_7);
              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_t_7); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 427, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    +428:                     continue

              goto __pyx_L33_continue;

     429:

    +430:                 if parse_arrays:

            __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_parse_arrays); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 430, __pyx_L1_error)
            if (__pyx_t_1) {
    /* … */
              goto __pyx_L37;
            }

     431:                     # Parse the JSON array into Python list

    +432:                     o_ptr = ParseJsonSliceToPyObject(<const uint8_t*>raw.data(), raw.size(), True)

              __pyx_v_o_ptr = ParseJsonSliceToPyObject(((uint8_t const *)__pyx_v_raw.data()), __pyx_v_raw.size(), 1);

    +433:                     if o_ptr != NULL:

              __pyx_t_1 = (__pyx_v_o_ptr != NULL);
              if (__pyx_t_1) {
    /* … */
                goto __pyx_L38;
              }

    +434:                         o = <object>o_ptr

                __pyx_t_7 = ((PyObject *)__pyx_v_o_ptr);
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_7);
                __pyx_t_7 = 0;

     435:                         # If element type is bytes, or unspecified but the parsed

     436:                         # array contains string elements (likely binary-as-JSON

     437:                         # strings), convert those strings to bytes.

    +438:                         if isinstance(o, list):

                __pyx_t_1 = PyList_Check(__pyx_v_o);
                if (__pyx_t_1) {
    /* … */
                }

    +439:                             if elem_type == 'bytes':

                  __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_elem_type, __pyx_mstate_global->__pyx_n_u_bytes, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 439, __pyx_L1_error)
                  if (__pyx_t_1) {
    /* … */
                    goto __pyx_L40;
                  }

    +440:                                 _convert_strings_to_bytes_inplace(o)

                    __pyx_t_7 = __pyx_pf_4rugo_5jsonl_10read_jsonl__convert_strings_to_bytes_inplace(__pyx_cur_scope->__pyx_v__convert_strings_to_bytes_inplace, __pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 440, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    +441:                             elif elem_type is None:

                  __pyx_t_1 = (__pyx_v_elem_type == Py_None);
                  if (__pyx_t_1) {
    /* … */
                  }
                  __pyx_L40:;

     442:                                 # Heuristic: if at least one leaf element is str,

     443:                                 # convert all string leaves to bytes

    +444:                                 def _has_string_leaf(x):

    /* Python wrapper */
    static PyObject *__pyx_pw_4rugo_5jsonl_10read_jsonl_3_has_string_leaf(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_4rugo_5jsonl_10read_jsonl_3_has_string_leaf = {"_has_string_leaf", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4rugo_5jsonl_10read_jsonl_3_has_string_leaf, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_4rugo_5jsonl_10read_jsonl_3_has_string_leaf(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_x = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_has_string_leaf (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 444, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 444, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_has_string_leaf", 0) < (0)) __PYX_ERR(0, 444, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_has_string_leaf", 1, 1, 1, i); __PYX_ERR(0, 444, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 444, __pyx_L3_error)
        }
        __pyx_v_x = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_has_string_leaf", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 444, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("rugo.jsonl.read_jsonl._has_string_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_4rugo_5jsonl_10read_jsonl_2_has_string_leaf(__pyx_self, __pyx_v_x);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_4rugo_5jsonl_10read_jsonl_2_has_string_leaf(PyObject *__pyx_self, PyObject *__pyx_v_x) {
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *__pyx_cur_scope;
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *__pyx_outer_scope;
      PyObject *__pyx_v_y = NULL;
      PyObject *__pyx_r = NULL;
      __pyx_outer_scope = (struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *) __Pyx_CyFunction_GetClosure(__pyx_self);
      __pyx_cur_scope = __pyx_outer_scope;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("rugo.jsonl.read_jsonl._has_string_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_y);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
                    __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_4rugo_5jsonl_10read_jsonl_3_has_string_leaf, 0, __pyx_mstate_global->__pyx_n_u_read_jsonl_locals__has_string_le, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_rugo_jsonl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[2])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 444, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__has_string_leaf);
                    __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__has_string_leaf, __pyx_t_7);
                    __Pyx_GIVEREF(__pyx_t_7);
                    __pyx_t_7 = 0;

    +445:                                     if isinstance(x, list):

      __pyx_t_1 = PyList_Check(__pyx_v_x);
      if (__pyx_t_1) {
    /* … */
      }

    +446:                                         for y in x:

        if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) {
          __pyx_t_2 = __pyx_v_x; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_3 = 0;
          __pyx_t_4 = NULL;
        } else {
          __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 446, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 446, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_4)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 446, __pyx_L1_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_3);
              ++__pyx_t_3;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 446, __pyx_L1_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
              #else
              __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
              #endif
              ++__pyx_t_3;
            }
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 446, __pyx_L1_error)
          } else {
            __pyx_t_5 = __pyx_t_4(__pyx_t_2);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 446, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_5);
          __pyx_t_5 = 0;
    /* … */
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +447:                                             if _has_string_leaf(y):

          if (unlikely(!__pyx_cur_scope->__pyx_v__has_string_leaf)) { __Pyx_RaiseClosureNameError("_has_string_leaf"); __PYX_ERR(0, 447, __pyx_L1_error) }
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_cur_scope->__pyx_v__has_string_leaf, __pyx_v_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 447, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 447, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_1) {
    /* … */
          }

    +448:                                                 return True

            __Pyx_XDECREF(__pyx_r);
            __Pyx_INCREF(Py_True);
            __pyx_r = Py_True;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L0;

    +449:                                         return False

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;

    +450:                                     return isinstance(x, str)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyUnicode_Check(__pyx_v_x);
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 450, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

    +451:                                 if _has_string_leaf(o):

                    __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_cur_scope->__pyx_v__has_string_leaf, __pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 451, __pyx_L1_error)
                    __Pyx_GOTREF(__pyx_t_7);
                    __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 451, __pyx_L1_error)
                    __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                    if (__pyx_t_1) {
    /* … */
                    }

    +452:                                     _convert_strings_to_bytes_inplace(o)

                      __pyx_t_7 = __pyx_pf_4rugo_5jsonl_10read_jsonl__convert_strings_to_bytes_inplace(__pyx_cur_scope->__pyx_v__convert_strings_to_bytes_inplace, __pyx_v_o); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 452, __pyx_L1_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    +453:                         py_list.append(o)

                __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_v_o); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 453, __pyx_L1_error)

     454:                     else:

    +455:                         if PyErr_Occurred():

              /*else*/ {
                __pyx_t_1 = (PyErr_Occurred() != 0);
                if (__pyx_t_1) {
    /* … */
                }

    +456:                             PyErr_Clear()

                  PyErr_Clear();

    +457:                         try:

                {
                  /*try:*/ {
    /* … */
                  }
                  __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                  __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
                  __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
                  goto __pyx_L50_try_end;
                  __pyx_L43_error:;
                  __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                  __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
                  __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                  __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    /* … */
                  __pyx_L45_except_error:;
                  __Pyx_XGIVEREF(__pyx_t_24);
                  __Pyx_XGIVEREF(__pyx_t_25);
                  __Pyx_XGIVEREF(__pyx_t_26);
                  __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26);
                  goto __pyx_L1_error;
                  __pyx_L44_exception_handled:;
                  __Pyx_XGIVEREF(__pyx_t_24);
                  __Pyx_XGIVEREF(__pyx_t_25);
                  __Pyx_XGIVEREF(__pyx_t_26);
                  __Pyx_ExceptionReset(__pyx_t_24, __pyx_t_25, __pyx_t_26);
                  __pyx_L50_try_end:;
                }
              }
              __pyx_L38:;

    +458:                             parsed = _parse_array_from_bytes(raw)

                    __pyx_t_2 = NULL;
                    __Pyx_GetModuleGlobalName(__pyx_t_6, __pyx_mstate_global->__pyx_n_u_parse_array_from_bytes); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 458, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_6);
                    __pyx_t_27 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_raw); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 458, __pyx_L43_error)
                    __Pyx_GOTREF(__pyx_t_27);
                    __pyx_t_23 = 1;
                    #if CYTHON_UNPACK_METHODS
                    if (unlikely(PyMethod_Check(__pyx_t_6))) {
                      __pyx_t_2 = PyMethod_GET_SELF(__pyx_t_6);
                      assert(__pyx_t_2);
                      PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_6);
                      __Pyx_INCREF(__pyx_t_2);
                      __Pyx_INCREF(__pyx__function);
                      __Pyx_DECREF_SET(__pyx_t_6, __pyx__function);
                      __pyx_t_23 = 0;
                    }
                    #endif
                    {
                      PyObject *__pyx_callargs[2] = {__pyx_t_2, __pyx_t_27};
                      __pyx_t_7 = __Pyx_PyObject_FastCall(__pyx_t_6, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (__pyx_t_23*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                      __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 458, __pyx_L43_error)
                      __Pyx_GOTREF(__pyx_t_7);
                    }
                    __Pyx_XDECREF_SET(__pyx_v_parsed, __pyx_t_7);
                    __pyx_t_7 = 0;

    +459:                             if isinstance(parsed, list):

                    __pyx_t_1 = PyList_Check(__pyx_v_parsed);
                    if (__pyx_t_1) {
    /* … */
                    }

    +460:                                 if elem_type == 'bytes':

                      __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_elem_type, __pyx_mstate_global->__pyx_n_u_bytes, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 460, __pyx_L43_error)
                      if (__pyx_t_1) {
    /* … */
                        goto __pyx_L52;
                      }

    +461:                                     _convert_strings_to_bytes_inplace(parsed)

                        __pyx_t_7 = __pyx_pf_4rugo_5jsonl_10read_jsonl__convert_strings_to_bytes_inplace(__pyx_cur_scope->__pyx_v__convert_strings_to_bytes_inplace, __pyx_v_parsed); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 461, __pyx_L43_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    +462:                                 elif elem_type is None:

                      __pyx_t_1 = (__pyx_v_elem_type == Py_None);
                      if (__pyx_t_1) {
    /* … */
                      }
                      __pyx_L52:;

    +463:                                     def _has_string_leaf(x):

    /* Python wrapper */
    static PyObject *__pyx_pw_4rugo_5jsonl_10read_jsonl_5_has_string_leaf(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ); /*proto*/
    static PyMethodDef __pyx_mdef_4rugo_5jsonl_10read_jsonl_5_has_string_leaf = {"_has_string_leaf", (PyCFunction)(void(*)(void))(__Pyx_PyCFunction_FastCallWithKeywords)__pyx_pw_4rugo_5jsonl_10read_jsonl_5_has_string_leaf, __Pyx_METH_FASTCALL|METH_KEYWORDS, 0};
    static PyObject *__pyx_pw_4rugo_5jsonl_10read_jsonl_5_has_string_leaf(PyObject *__pyx_self,
    #if CYTHON_METH_FASTCALL
    PyObject *const *__pyx_args, Py_ssize_t __pyx_nargs, PyObject *__pyx_kwds
    #else
    PyObject *__pyx_args, PyObject *__pyx_kwds
    #endif
    ) {
      PyObject *__pyx_v_x = 0;
      #if !CYTHON_METH_FASTCALL
      CYTHON_UNUSED Py_ssize_t __pyx_nargs;
      #endif
      CYTHON_UNUSED PyObject *const *__pyx_kwvalues;
      PyObject *__pyx_r = 0;
      __Pyx_RefNannyDeclarations
      __Pyx_RefNannySetupContext("_has_string_leaf (wrapper)", 0);
      #if !CYTHON_METH_FASTCALL
      #if CYTHON_ASSUME_SAFE_SIZE
      __pyx_nargs = PyTuple_GET_SIZE(__pyx_args);
      #else
      __pyx_nargs = PyTuple_Size(__pyx_args); if (unlikely(__pyx_nargs < 0)) return NULL;
      #endif
      #endif
      __pyx_kwvalues = __Pyx_KwValues_FASTCALL(__pyx_args, __pyx_nargs);
      {
        PyObject ** const __pyx_pyargnames[] = {&__pyx_mstate_global->__pyx_n_u_x,0};
      PyObject* values[1] = {0};
        const Py_ssize_t __pyx_kwds_len = (__pyx_kwds) ? __Pyx_NumKwargs_FASTCALL(__pyx_kwds) : 0;
        if (unlikely(__pyx_kwds_len) < 0) __PYX_ERR(0, 463, __pyx_L3_error)
        if (__pyx_kwds_len > 0) {
          switch (__pyx_nargs) {
            case  1:
            values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
            if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 463, __pyx_L3_error)
            CYTHON_FALLTHROUGH;
            case  0: break;
            default: goto __pyx_L5_argtuple_error;
          }
          const Py_ssize_t kwd_pos_args = __pyx_nargs;
          if (__Pyx_ParseKeywords(__pyx_kwds, __pyx_kwvalues, __pyx_pyargnames, 0, values, kwd_pos_args, __pyx_kwds_len, "_has_string_leaf", 0) < (0)) __PYX_ERR(0, 463, __pyx_L3_error)
          for (Py_ssize_t i = __pyx_nargs; i < 1; i++) {
            if (unlikely(!values[i])) { __Pyx_RaiseArgtupleInvalid("_has_string_leaf", 1, 1, 1, i); __PYX_ERR(0, 463, __pyx_L3_error) }
          }
        } else if (unlikely(__pyx_nargs != 1)) {
          goto __pyx_L5_argtuple_error;
        } else {
          values[0] = __Pyx_ArgRef_FASTCALL(__pyx_args, 0);
          if (!CYTHON_ASSUME_SAFE_MACROS && unlikely(!values[0])) __PYX_ERR(0, 463, __pyx_L3_error)
        }
        __pyx_v_x = values[0];
      }
      goto __pyx_L6_skip;
      __pyx_L5_argtuple_error:;
      __Pyx_RaiseArgtupleInvalid("_has_string_leaf", 1, 1, 1, __pyx_nargs); __PYX_ERR(0, 463, __pyx_L3_error)
      __pyx_L6_skip:;
      goto __pyx_L4_argument_unpacking_done;
      __pyx_L3_error:;
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_AddTraceback("rugo.jsonl.read_jsonl._has_string_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __Pyx_RefNannyFinishContext();
      return NULL;
      __pyx_L4_argument_unpacking_done:;
      __pyx_r = __pyx_pf_4rugo_5jsonl_10read_jsonl_4_has_string_leaf(__pyx_self, __pyx_v_x);
      int __pyx_lineno = 0;
      const char *__pyx_filename = NULL;
      int __pyx_clineno = 0;

      /* function exit code */
      for (Py_ssize_t __pyx_temp=0; __pyx_temp < (Py_ssize_t)(sizeof(values)/sizeof(values[0])); ++__pyx_temp) {
        Py_XDECREF(values[__pyx_temp]);
      }
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }

    static PyObject *__pyx_pf_4rugo_5jsonl_10read_jsonl_4_has_string_leaf(PyObject *__pyx_self, PyObject *__pyx_v_x) {
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *__pyx_cur_scope;
      struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *__pyx_outer_scope;
      PyObject *__pyx_v_y = NULL;
      PyObject *__pyx_r = NULL;
      __pyx_outer_scope = (struct __pyx_obj_4rugo_5jsonl___pyx_scope_struct_1_read_jsonl *) __Pyx_CyFunction_GetClosure(__pyx_self);
      __pyx_cur_scope = __pyx_outer_scope;
    /* … */
      /* function exit code */
      __pyx_L1_error:;
      __Pyx_XDECREF(__pyx_t_2);
      __Pyx_XDECREF(__pyx_t_5);
      __Pyx_AddTraceback("rugo.jsonl.read_jsonl._has_string_leaf", __pyx_clineno, __pyx_lineno, __pyx_filename);
      __pyx_r = NULL;
      __pyx_L0:;
      __Pyx_XDECREF(__pyx_v_y);
      __Pyx_XGIVEREF(__pyx_r);
      __Pyx_RefNannyFinishContext();
      return __pyx_r;
    }
    /* … */
                        __pyx_t_7 = __Pyx_CyFunction_New(&__pyx_mdef_4rugo_5jsonl_10read_jsonl_5_has_string_leaf, 0, __pyx_mstate_global->__pyx_n_u_read_jsonl_locals__has_string_le, ((PyObject*)__pyx_cur_scope), __pyx_mstate_global->__pyx_n_u_rugo_jsonl, __pyx_mstate_global->__pyx_d, ((PyObject *)__pyx_mstate_global->__pyx_codeobj_tab[3])); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 463, __pyx_L43_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __Pyx_XGOTREF(__pyx_cur_scope->__pyx_v__has_string_leaf);
                        __Pyx_XDECREF_SET(__pyx_cur_scope->__pyx_v__has_string_leaf, __pyx_t_7);
                        __Pyx_GIVEREF(__pyx_t_7);
                        __pyx_t_7 = 0;

    +464:                                         if isinstance(x, list):

      __pyx_t_1 = PyList_Check(__pyx_v_x);
      if (__pyx_t_1) {
    /* … */
      }

    +465:                                             for y in x:

        if (likely(PyList_CheckExact(__pyx_v_x)) || PyTuple_CheckExact(__pyx_v_x)) {
          __pyx_t_2 = __pyx_v_x; __Pyx_INCREF(__pyx_t_2);
          __pyx_t_3 = 0;
          __pyx_t_4 = NULL;
        } else {
          __pyx_t_3 = -1; __pyx_t_2 = PyObject_GetIter(__pyx_v_x); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 465, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_2);
          __pyx_t_4 = (CYTHON_COMPILING_IN_LIMITED_API) ? PyIter_Next : __Pyx_PyObject_GetIterNextFunc(__pyx_t_2); if (unlikely(!__pyx_t_4)) __PYX_ERR(0, 465, __pyx_L1_error)
        }
        for (;;) {
          if (likely(!__pyx_t_4)) {
            if (likely(PyList_CheckExact(__pyx_t_2))) {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyList_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 465, __pyx_L1_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              __pyx_t_5 = __Pyx_PyList_GetItemRef(__pyx_t_2, __pyx_t_3);
              ++__pyx_t_3;
            } else {
              {
                Py_ssize_t __pyx_temp = __Pyx_PyTuple_GET_SIZE(__pyx_t_2);
                #if !CYTHON_ASSUME_SAFE_SIZE
                if (unlikely((__pyx_temp < 0))) __PYX_ERR(0, 465, __pyx_L1_error)
                #endif
                if (__pyx_t_3 >= __pyx_temp) break;
              }
              #if CYTHON_ASSUME_SAFE_MACROS && !CYTHON_AVOID_BORROWED_REFS
              __pyx_t_5 = __Pyx_NewRef(PyTuple_GET_ITEM(__pyx_t_2, __pyx_t_3));
              #else
              __pyx_t_5 = __Pyx_PySequence_ITEM(__pyx_t_2, __pyx_t_3);
              #endif
              ++__pyx_t_3;
            }
            if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 465, __pyx_L1_error)
          } else {
            __pyx_t_5 = __pyx_t_4(__pyx_t_2);
            if (unlikely(!__pyx_t_5)) {
              PyObject* exc_type = PyErr_Occurred();
              if (exc_type) {
                if (unlikely(!__Pyx_PyErr_GivenExceptionMatches(exc_type, PyExc_StopIteration))) __PYX_ERR(0, 465, __pyx_L1_error)
                PyErr_Clear();
              }
              break;
            }
          }
          __Pyx_GOTREF(__pyx_t_5);
          __Pyx_XDECREF_SET(__pyx_v_y, __pyx_t_5);
          __pyx_t_5 = 0;
    /* … */
        }
        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;

    +466:                                                 if _has_string_leaf(y):

          if (unlikely(!__pyx_cur_scope->__pyx_v__has_string_leaf)) { __Pyx_RaiseClosureNameError("_has_string_leaf"); __PYX_ERR(0, 466, __pyx_L1_error) }
          __pyx_t_5 = __Pyx_PyObject_CallOneArg(__pyx_cur_scope->__pyx_v__has_string_leaf, __pyx_v_y); if (unlikely(!__pyx_t_5)) __PYX_ERR(0, 466, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_5);
          __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_5); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 466, __pyx_L1_error)
          __Pyx_DECREF(__pyx_t_5); __pyx_t_5 = 0;
          if (__pyx_t_1) {
    /* … */
          }

    +467:                                                     return True

            __Pyx_XDECREF(__pyx_r);
            __Pyx_INCREF(Py_True);
            __pyx_r = Py_True;
            __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
            goto __pyx_L0;

    +468:                                             return False

        __Pyx_XDECREF(__pyx_r);
        __Pyx_INCREF(Py_False);
        __pyx_r = Py_False;
        goto __pyx_L0;

    +469:                                         return isinstance(x, str)

      __Pyx_XDECREF(__pyx_r);
      __pyx_t_1 = PyUnicode_Check(__pyx_v_x);
      __pyx_t_2 = __Pyx_PyBool_FromLong(__pyx_t_1); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 469, __pyx_L1_error)
      __Pyx_GOTREF(__pyx_t_2);
      __pyx_r = __pyx_t_2;
      __pyx_t_2 = 0;
      goto __pyx_L0;

    +470:                                     if _has_string_leaf(parsed):

                        __pyx_t_7 = __Pyx_PyObject_CallOneArg(__pyx_cur_scope->__pyx_v__has_string_leaf, __pyx_v_parsed); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 470, __pyx_L43_error)
                        __Pyx_GOTREF(__pyx_t_7);
                        __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_7); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 470, __pyx_L43_error)
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (__pyx_t_1) {
    /* … */
                        }

    +471:                                         _convert_strings_to_bytes_inplace(parsed)

                          __pyx_t_7 = __pyx_pf_4rugo_5jsonl_10read_jsonl__convert_strings_to_bytes_inplace(__pyx_cur_scope->__pyx_v__convert_strings_to_bytes_inplace, __pyx_v_parsed); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 471, __pyx_L43_error)
                          __Pyx_GOTREF(__pyx_t_7);
                          __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    +472:                             py_list.append(parsed)

                    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_v_parsed); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 472, __pyx_L43_error)

    +473:                         except Exception:

                  __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
                  if (__pyx_t_5) {
                    __Pyx_AddTraceback("rugo.jsonl.read_jsonl", __pyx_clineno, __pyx_lineno, __pyx_filename);
                    if (__Pyx_GetException(&__pyx_t_7, &__pyx_t_6, &__pyx_t_27) < 0) __PYX_ERR(0, 473, __pyx_L45_except_error)
                    __Pyx_XGOTREF(__pyx_t_7);
                    __Pyx_XGOTREF(__pyx_t_6);
                    __Pyx_XGOTREF(__pyx_t_27);

     474:                             # Fallback to raw string

    +475:                             py_list.append(raw.decode('utf-8'))

                    __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_v_raw, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 475, __pyx_L45_except_error)
                    __Pyx_GOTREF(__pyx_t_2);
                    __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 475, __pyx_L45_except_error)
                    __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
                    goto __pyx_L44_exception_handled;
                  }
                  goto __pyx_L45_except_error;

     476:                 else:

     477:                     # Return as string without parsing

    +478:                     py_list.append(raw.decode('utf-8'))

            /*else*/ {
              __pyx_t_27 = __Pyx_decode_cpp_string(__pyx_v_raw, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 478, __pyx_L1_error)
              __Pyx_GOTREF(__pyx_t_27);
              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_t_27); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 478, __pyx_L1_error)
              __Pyx_DECREF(__pyx_t_27); __pyx_t_27 = 0;
            }
            __pyx_L37:;
            __pyx_L33_continue:;
          }

    +479:             py_columns.append(py_list)

          __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_columns, __pyx_v_py_list); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 479, __pyx_L1_error)

    +480:         elif col_type == 'object':

        __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_col_type, __pyx_mstate_global->__pyx_n_u_object, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 480, __pyx_L1_error)
        if (__pyx_t_1) {
    /* … */
            goto __pyx_L16;
          }

     481:             # Object columns: return as JSONB (bytes), may contain objects, arrays, or mixed

     482:             # Check each value and handle appropriately

    +483:             py_list = []

          __pyx_t_27 = PyList_New(0); if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 483, __pyx_L1_error)
          __Pyx_GOTREF(__pyx_t_27);
          __Pyx_XDECREF_SET(__pyx_v_py_list, ((PyObject*)__pyx_t_27));
          __pyx_t_27 = 0;

    +484:             for j in range(col.string_values.size()):

          __pyx_t_12 = __pyx_v_col->string_values.size();
          __pyx_t_13 = __pyx_t_12;
          for (__pyx_t_22 = 0; __pyx_t_22 < __pyx_t_13; __pyx_t_22+=1) {
            __pyx_v_j = __pyx_t_22;

    +485:                 if col.null_mask[j]:

            __pyx_t_1 = ((__pyx_v_col->null_mask[__pyx_v_j]) != 0);
            if (__pyx_t_1) {
    /* … */
            }

    +486:                     py_list.append(None)

              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 486, __pyx_L1_error)

    +487:                     continue

              goto __pyx_L56_continue;

     488:

    +489:                 raw = col.string_values[j]

            __pyx_v_raw = (__pyx_v_col->string_values[__pyx_v_j]);

    +490:                 if raw.size() == 0:

            __pyx_t_1 = (__pyx_v_raw.size() == 0);
            if (__pyx_t_1) {
    /* … */
            }

    +491:                     py_list.append(b'{}')

              __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_mstate_global->__pyx_kp_b__12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 491, __pyx_L1_error)

    +492:                     continue

              goto __pyx_L56_continue;

     493:

     494:                 # Check what type of JSON value this is

    +495:                 first = raw[0]

            __pyx_v_first = (__pyx_v_raw[0]);

     496:

    +497:                 if first == '[':

            switch (__pyx_v_first) {
              case '[':
    /* … */
              break;
              case '{':

     498:                     # This is an array in a mixed column

    +499:                     if parse_arrays:

              __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_v_parse_arrays); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 499, __pyx_L1_error)
              if (__pyx_t_1) {
    /* … */
                goto __pyx_L60;
              }

     500:                         # Parse as array into Python list

    +501:                         o_ptr = ParseJsonSliceToPyObject(<const uint8_t*>raw.data(), raw.size(), True)

                __pyx_v_o_ptr = ParseJsonSliceToPyObject(((uint8_t const *)__pyx_v_raw.data()), __pyx_v_raw.size(), 1);

    +502:                         if o_ptr != NULL:

                __pyx_t_1 = (__pyx_v_o_ptr != NULL);
                if (__pyx_t_1) {
    /* … */
                  goto __pyx_L61;
                }

    +503:                             o = <object>o_ptr

                  __pyx_t_27 = ((PyObject *)__pyx_v_o_ptr);
                  __Pyx_INCREF(__pyx_t_27);
                  __Pyx_DECREF_SET(__pyx_v_o, __pyx_t_27);
                  __pyx_t_27 = 0;

    +504:                             py_list.append(o)

                  __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_v_o); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 504, __pyx_L1_error)

     505:                         else:

    +506:                             if PyErr_Occurred():

                /*else*/ {
                  __pyx_t_1 = (PyErr_Occurred() != 0);
                  if (__pyx_t_1) {
    /* … */
                  }

    +507:                                 PyErr_Clear()

                    PyErr_Clear();

    +508:                             try:

                  {
                    /*try:*/ {
    /* … */
                    }
                    __Pyx_XDECREF(__pyx_t_26); __pyx_t_26 = 0;
                    __Pyx_XDECREF(__pyx_t_25); __pyx_t_25 = 0;
                    __Pyx_XDECREF(__pyx_t_24); __pyx_t_24 = 0;
                    goto __pyx_L70_try_end;
                    __pyx_L63_error:;
                    __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                    __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
                    __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                    __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
    /* … */
                    __pyx_L65_except_error:;
                    __Pyx_XGIVEREF(__pyx_t_26);
                    __Pyx_XGIVEREF(__pyx_t_25);
                    __Pyx_XGIVEREF(__pyx_t_24);
                    __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_25, __pyx_t_24);
                    goto __pyx_L1_error;
                    __pyx_L64_exception_handled:;
                    __Pyx_XGIVEREF(__pyx_t_26);
                    __Pyx_XGIVEREF(__pyx_t_25);
                    __Pyx_XGIVEREF(__pyx_t_24);
                    __Pyx_ExceptionReset(__pyx_t_26, __pyx_t_25, __pyx_t_24);
                    __pyx_L70_try_end:;
                  }
                }
                __pyx_L61:;

    +509:                                 parsed = _parse_array_from_bytes(raw)

                      __pyx_t_6 = NULL;
                      __Pyx_GetModuleGlobalName(__pyx_t_7, __pyx_mstate_global->__pyx_n_u_parse_array_from_bytes); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 509, __pyx_L63_error)
                      __Pyx_GOTREF(__pyx_t_7);
                      __pyx_t_2 = __pyx_convert_PyBytes_string_to_py_6libcpp_6string_std__in_string(__pyx_v_raw); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 509, __pyx_L63_error)
                      __Pyx_GOTREF(__pyx_t_2);
                      __pyx_t_23 = 1;
                      #if CYTHON_UNPACK_METHODS
                      if (unlikely(PyMethod_Check(__pyx_t_7))) {
                        __pyx_t_6 = PyMethod_GET_SELF(__pyx_t_7);
                        assert(__pyx_t_6);
                        PyObject* __pyx__function = PyMethod_GET_FUNCTION(__pyx_t_7);
                        __Pyx_INCREF(__pyx_t_6);
                        __Pyx_INCREF(__pyx__function);
                        __Pyx_DECREF_SET(__pyx_t_7, __pyx__function);
                        __pyx_t_23 = 0;
                      }
                      #endif
                      {
                        PyObject *__pyx_callargs[2] = {__pyx_t_6, __pyx_t_2};
                        __pyx_t_27 = __Pyx_PyObject_FastCall(__pyx_t_7, __pyx_callargs+__pyx_t_23, (2-__pyx_t_23) | (__pyx_t_23*__Pyx_PY_VECTORCALL_ARGUMENTS_OFFSET));
                        __Pyx_XDECREF(__pyx_t_6); __pyx_t_6 = 0;
                        __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                        if (unlikely(!__pyx_t_27)) __PYX_ERR(0, 509, __pyx_L63_error)
                        __Pyx_GOTREF(__pyx_t_27);
                      }
                      __Pyx_XDECREF_SET(__pyx_v_parsed, __pyx_t_27);
                      __pyx_t_27 = 0;

    +510:                                 py_list.append(parsed)

                      __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_v_parsed); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 510, __pyx_L63_error)

    +511:                             except Exception:

                    __pyx_t_5 = __Pyx_PyErr_ExceptionMatches(((PyObject *)(((PyTypeObject*)PyExc_Exception))));
                    if (__pyx_t_5) {
                      __Pyx_AddTraceback("rugo.jsonl.read_jsonl", __pyx_clineno, __pyx_lineno, __pyx_filename);
                      if (__Pyx_GetException(&__pyx_t_27, &__pyx_t_7, &__pyx_t_2) < 0) __PYX_ERR(0, 511, __pyx_L65_except_error)
                      __Pyx_XGOTREF(__pyx_t_27);
                      __Pyx_XGOTREF(__pyx_t_7);
                      __Pyx_XGOTREF(__pyx_t_2);

    +512:                                 py_list.append(raw.decode('utf-8'))

                      __pyx_t_6 = __Pyx_decode_cpp_string(__pyx_v_raw, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_6)) __PYX_ERR(0, 512, __pyx_L65_except_error)
                      __Pyx_GOTREF(__pyx_t_6);
                      __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_t_6); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 512, __pyx_L65_except_error)
                      __Pyx_DECREF(__pyx_t_6); __pyx_t_6 = 0;
                      __Pyx_XDECREF(__pyx_t_27); __pyx_t_27 = 0;
                      __Pyx_XDECREF(__pyx_t_7); __pyx_t_7 = 0;
                      __Pyx_XDECREF(__pyx_t_2); __pyx_t_2 = 0;
                      goto __pyx_L64_exception_handled;
                    }
                    goto __pyx_L65_except_error;

     513:                     else:

     514:                         # Arrays not requested, return as string

    +515:                         py_list.append(raw.decode('utf-8'))

              /*else*/ {
                __pyx_t_2 = __Pyx_decode_cpp_string(__pyx_v_raw, 0, PY_SSIZE_T_MAX, NULL, NULL, PyUnicode_DecodeUTF8); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 515, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 515, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              __pyx_L60:;

     516:

    +517:                 elif first == '{':

                break;
                default:

     518:                     # This is an object - always return as JSONB (bytes)

    +519:                     py_obj = <object>PyBytes_FromStringAndSize(<const char*>raw.data(), <Py_ssize_t>raw.size())

                __pyx_t_2 = PyBytes_FromStringAndSize(((char const *)__pyx_v_raw.data()), ((Py_ssize_t)__pyx_v_raw.size())); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 519, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_7 = __pyx_t_2;
                __Pyx_INCREF(__pyx_t_7);
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __Pyx_XDECREF_SET(__pyx_v_py_obj, __pyx_t_7);
                __pyx_t_7 = 0;

    +520:                     if py_obj is not None:

                __pyx_t_1 = (__pyx_v_py_obj != Py_None);
                if (__pyx_t_1) {
    /* … */
                  goto __pyx_L73;
                }

    +521:                         py_list.append(py_obj)

                  __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_v_py_obj); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 521, __pyx_L1_error)

     522:                     else:

    +523:                         py_list.append(b'{}')

                /*else*/ {
                  __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_mstate_global->__pyx_kp_b__12); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 523, __pyx_L1_error)
                }
                __pyx_L73:;

     524:                 else:

     525:                     # Unexpected - fallback to bytes

    +526:                     py_obj = <object>PyBytes_FromStringAndSize(<const char*>raw.data(), <Py_ssize_t>raw.size())

                __pyx_t_7 = PyBytes_FromStringAndSize(((char const *)__pyx_v_raw.data()), ((Py_ssize_t)__pyx_v_raw.size())); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 526, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_7);
                __pyx_t_2 = __pyx_t_7;
                __Pyx_INCREF(__pyx_t_2);
                __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;
                __Pyx_XDECREF_SET(__pyx_v_py_obj, __pyx_t_2);
                __pyx_t_2 = 0;

    +527:                     if py_obj is not None:

                __pyx_t_1 = (__pyx_v_py_obj != Py_None);
                if (__pyx_t_1) {
    /* … */
                  goto __pyx_L74;
                }

    +528:                         py_list.append(py_obj)

                  __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_v_py_obj); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 528, __pyx_L1_error)

     529:                     else:

    +530:                         py_list.append(b'')

                /*else*/ {
                  __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_mstate_global->__pyx_kp_b_); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 530, __pyx_L1_error)
                }
                __pyx_L74:;
                break;
              }
              __pyx_L56_continue:;
            }

    +531:             py_columns.append(py_list)

            __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_columns, __pyx_v_py_list); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 531, __pyx_L1_error)

    +532:         elif col_type == 'boolean':

          __pyx_t_1 = (__Pyx_PyUnicode_Equals(__pyx_v_col_type, __pyx_mstate_global->__pyx_n_u_boolean, Py_EQ)); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 532, __pyx_L1_error)
          if (__pyx_t_1) {
    /* … */
            goto __pyx_L16;
          }

    +533:             py_list = []

            __pyx_t_2 = PyList_New(0); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 533, __pyx_L1_error)
            __Pyx_GOTREF(__pyx_t_2);
            __Pyx_XDECREF_SET(__pyx_v_py_list, ((PyObject*)__pyx_t_2));
            __pyx_t_2 = 0;

    +534:             for j in range(col.boolean_values.size()):

            __pyx_t_28 = __pyx_v_col->boolean_values.size();
            __pyx_t_29 = __pyx_t_28;
            for (__pyx_t_12 = 0; __pyx_t_12 < __pyx_t_29; __pyx_t_12+=1) {
              __pyx_v_j = __pyx_t_12;

    +535:                 if col.null_mask[j]:

              __pyx_t_1 = ((__pyx_v_col->null_mask[__pyx_v_j]) != 0);
              if (__pyx_t_1) {
    /* … */
                goto __pyx_L77;
              }

    +536:                     py_list.append(None)

                __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 536, __pyx_L1_error)

     537:                 else:

    +538:                     py_list.append(bool(col.boolean_values[j]))

              /*else*/ {
                __pyx_t_2 = __Pyx_PyLong_From_uint8_t((__pyx_v_col->boolean_values[__pyx_v_j])); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_1 = __Pyx_PyObject_IsTrue(__pyx_t_2); if (unlikely((__pyx_t_1 < 0))) __PYX_ERR(0, 538, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
                __pyx_t_2 = __Pyx_PyBool_FromLong((!(!__pyx_t_1))); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 538, __pyx_L1_error)
                __Pyx_GOTREF(__pyx_t_2);
                __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_list, __pyx_t_2); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 538, __pyx_L1_error)
                __Pyx_DECREF(__pyx_t_2); __pyx_t_2 = 0;
              }
              __pyx_L77:;
            }

    +539:             py_columns.append(py_list)

            __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_columns, __pyx_v_py_list); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 539, __pyx_L1_error)

     540:         else:

    +541:             py_columns.append(None)

          /*else*/ {
            __pyx_t_14 = __Pyx_PyList_Append(__pyx_v_py_columns, Py_None); if (unlikely(__pyx_t_14 == ((int)-1))) __PYX_ERR(0, 541, __pyx_L1_error)
          }
          __pyx_L16:;
          __pyx_L13_continue:;
        }

    +542:     return {

        __Pyx_XDECREF(__pyx_r);

    +543:         'success': True,

        __pyx_t_2 = __Pyx_PyDict_NewPresized(4); if (unlikely(!__pyx_t_2)) __PYX_ERR(0, 543, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_2);
        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_success, Py_True) < (0)) __PYX_ERR(0, 543, __pyx_L1_error)

    +544:         'column_names': py_column_names,

        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_column_names, __pyx_v_py_column_names) < (0)) __PYX_ERR(0, 543, __pyx_L1_error)

    +545:         'num_rows': table.num_rows,

        __pyx_t_7 = __Pyx_PyLong_FromSize_t(__pyx_v_table.num_rows); if (unlikely(!__pyx_t_7)) __PYX_ERR(0, 545, __pyx_L1_error)
        __Pyx_GOTREF(__pyx_t_7);
        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_num_rows, __pyx_t_7) < (0)) __PYX_ERR(0, 543, __pyx_L1_error)
        __Pyx_DECREF(__pyx_t_7); __pyx_t_7 = 0;

    +546:         'columns': py_columns

        if (PyDict_SetItem(__pyx_t_2, __pyx_mstate_global->__pyx_n_u_columns, __pyx_v_py_columns) < (0)) __PYX_ERR(0, 543, __pyx_L1_error)
        __pyx_r = __pyx_t_2;
        __pyx_t_2 = 0;
        goto __pyx_L0;

     547:     }