Skip to content
Snippets Groups Projects
Commit b7c85357 authored by Mark Olesen's avatar Mark Olesen
Browse files

ENH: added binary IO for PackedList and compact ASCII format

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}
parent d18695d7
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment