⍝ Unique packer:

    packU'Mississippi'                  ⍝ Unique packing
┌──┬────┬─────────────────────┐
│11│Misp│0 1 2 2 1 2 2 1 3 3 1│
└──┴────┴─────────────────────┘

    chk←{
        ⍵≡0 ⍺⍺ ⍺⍺ ⍵:'ok'
        ' Error: compression round-trip fails'
    }

    packU chk ⎕fmt notes.Marilyn        ⍝ simple text matrix
ok

Back to: code

Back to: Workspaces