Skip to content
  • Mark Olesen's avatar
    ENH: added binary IO for PackedList and compact ASCII format · b7c85357
    Mark Olesen authored
    The compact ASCII format is a block of index/value tuples for the
    non-zero entries:
    
        { (index1 value1) (index2 value2) (index3 value3) }
    
    For PackedList<1>, and thus PackedBoolList, the compact ASCII format is
    a block of indices for the non-zero entries:
    
        { index1 index2 index3 }
    
    Thus either of the following could be used - for PackedList<2>:
    
      - a list of all values:
            16(0 3 0 2 0 0 3 1 0 0 0 0 0 0 0 1)
    
      - a block of index/value tuples:
            {(1 3) (3 2) (7 3) (8 1) (15 1)}
    
    For PackedList<1> and PackedBoolList, either of the following could be
    used:
    
      - a list of all values, using any valid bool representation:
            16(0 1 0 true 0 0 t 1 0 n n 0 0 0 0 yes)
    
      - a block of the indices for non-zero entries:
            {1 3 7 8 15}
    b7c85357