AsSlice decompresses the contents into a []uint16 slice.
()
| 957 | |
| 958 | // AsSlice decompresses the contents into a []uint16 slice. |
| 959 | func (rc *runContainer16) AsSlice() []uint16 { |
| 960 | s := make([]uint16, rc.getCardinality()) |
| 961 | j := 0 |
| 962 | for _, p := range rc.iv { |
| 963 | for i := p.start; i <= p.last(); i++ { |
| 964 | s[j] = i |
| 965 | j++ |
| 966 | } |
| 967 | } |
| 968 | return s |
| 969 | } |
| 970 | |
| 971 | // newRunContainer16 creates an empty run container. |
| 972 | func newRunContainer16() *runContainer16 { |