github.com/apache/arrow/go/v14@v14.0.2/parquet/internal/utils/bit_packing_default.go (about)

     1  // Licensed to the Apache Software Foundation (ASF) under one
     2  // or more contributor license agreements.  See the NOTICE file
     3  // distributed with this work for additional information
     4  // regarding copyright ownership.  The ASF licenses this file
     5  // to you under the Apache License, Version 2.0 (the
     6  // "License"); you may not use this file except in compliance
     7  // with the License.  You may obtain a copy of the License at
     8  //
     9  // http://www.apache.org/licenses/LICENSE-2.0
    10  //
    11  // Unless required by applicable law or agreed to in writing, software
    12  // distributed under the License is distributed on an "AS IS" BASIS,
    13  // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
    14  // See the License for the specific language governing permissions and
    15  // limitations under the License.
    16  
    17  package utils
    18  
    19  import (
    20  	"encoding/binary"
    21  	"io"
    22  )
    23  
    24  var unpack32 func(io.Reader, []uint32, int) int = unpack32Default
    25  
    26  type unpackFunc func(in io.Reader, out []uint32)
    27  
    28  func unpack1_32(in io.Reader, out []uint32) {
    29  	var inl uint32
    30  	binary.Read(in, binary.LittleEndian, &inl)
    31  	for idx := range out[:32] {
    32  		out[idx] = (inl >> idx) & 1
    33  	}
    34  }
    35  
    36  func unpack2_32(in io.Reader, out []uint32) {
    37  	var inl uint32
    38  	binary.Read(in, binary.LittleEndian, &inl)
    39  	out[0] = (inl >> 0) % (1 << 2)
    40  	out[1] = (inl >> 2) % (1 << 2)
    41  	out[2] = (inl >> 4) % (1 << 2)
    42  	out[3] = (inl >> 6) % (1 << 2)
    43  	out[4] = (inl >> 8) % (1 << 2)
    44  	out[5] = (inl >> 10) % (1 << 2)
    45  	out[6] = (inl >> 12) % (1 << 2)
    46  	out[7] = (inl >> 14) % (1 << 2)
    47  	out[8] = (inl >> 16) % (1 << 2)
    48  	out[9] = (inl >> 18) % (1 << 2)
    49  	out[10] = (inl >> 20) % (1 << 2)
    50  	out[11] = (inl >> 22) % (1 << 2)
    51  	out[12] = (inl >> 24) % (1 << 2)
    52  	out[13] = (inl >> 26) % (1 << 2)
    53  	out[14] = (inl >> 28) % (1 << 2)
    54  	out[15] = (inl >> 30)
    55  	binary.Read(in, binary.LittleEndian, &inl)
    56  	out[16] = (inl >> 0) % (1 << 2)
    57  	out[17] = (inl >> 2) % (1 << 2)
    58  	out[18] = (inl >> 4) % (1 << 2)
    59  	out[19] = (inl >> 6) % (1 << 2)
    60  	out[20] = (inl >> 8) % (1 << 2)
    61  	out[21] = (inl >> 10) % (1 << 2)
    62  	out[22] = (inl >> 12) % (1 << 2)
    63  	out[23] = (inl >> 14) % (1 << 2)
    64  	out[24] = (inl >> 16) % (1 << 2)
    65  	out[25] = (inl >> 18) % (1 << 2)
    66  	out[26] = (inl >> 20) % (1 << 2)
    67  	out[27] = (inl >> 22) % (1 << 2)
    68  	out[28] = (inl >> 24) % (1 << 2)
    69  	out[29] = (inl >> 26) % (1 << 2)
    70  	out[30] = (inl >> 28) % (1 << 2)
    71  	out[31] = (inl >> 30)
    72  }
    73  
    74  func unpack3_32(in io.Reader, out []uint32) {
    75  	var inl uint32
    76  	binary.Read(in, binary.LittleEndian, &inl)
    77  	out[0] = (inl >> 0) % (1 << 3)
    78  	out[1] = (inl >> 3) % (1 << 3)
    79  	out[2] = (inl >> 6) % (1 << 3)
    80  	out[3] = (inl >> 9) % (1 << 3)
    81  	out[4] = (inl >> 12) % (1 << 3)
    82  	out[5] = (inl >> 15) % (1 << 3)
    83  	out[6] = (inl >> 18) % (1 << 3)
    84  	out[7] = (inl >> 21) % (1 << 3)
    85  	out[8] = (inl >> 24) % (1 << 3)
    86  	out[9] = (inl >> 27) % (1 << 3)
    87  	out[10] = (inl >> 30)
    88  	binary.Read(in, binary.LittleEndian, &inl)
    89  	out[10] |= (inl % (1 << 1)) << (3 - 1)
    90  	out[11] = (inl >> 1) % (1 << 3)
    91  	out[12] = (inl >> 4) % (1 << 3)
    92  	out[13] = (inl >> 7) % (1 << 3)
    93  	out[14] = (inl >> 10) % (1 << 3)
    94  	out[15] = (inl >> 13) % (1 << 3)
    95  	out[16] = (inl >> 16) % (1 << 3)
    96  	out[17] = (inl >> 19) % (1 << 3)
    97  	out[18] = (inl >> 22) % (1 << 3)
    98  	out[19] = (inl >> 25) % (1 << 3)
    99  	out[20] = (inl >> 28) % (1 << 3)
   100  	out[21] = (inl >> 31) % (1 << 3)
   101  	binary.Read(in, binary.LittleEndian, &inl)
   102  	out[21] |= (inl % (1 << 2)) << (3 - 2)
   103  	out[22] = (inl >> 2) % (1 << 3)
   104  	out[23] = (inl >> 5) % (1 << 3)
   105  	out[24] = (inl >> 8) % (1 << 3)
   106  	out[25] = (inl >> 11) % (1 << 3)
   107  	out[26] = (inl >> 14) % (1 << 3)
   108  	out[27] = (inl >> 17) % (1 << 3)
   109  	out[28] = (inl >> 20) % (1 << 3)
   110  	out[29] = (inl >> 23) % (1 << 3)
   111  	out[30] = (inl >> 26) % (1 << 3)
   112  	out[31] = (inl >> 29)
   113  }
   114  
   115  func unpack4_32(in io.Reader, out []uint32) {
   116  	var inl uint32
   117  	binary.Read(in, binary.LittleEndian, &inl)
   118  	for i := 0; i < 28; i += 4 {
   119  		out[i/4] = (inl >> i) % (1 << 4)
   120  	}
   121  	out[7] = (inl >> 28)
   122  	binary.Read(in, binary.LittleEndian, &inl)
   123  	for i := 0; i < 28; i += 4 {
   124  		out[8+i/4] = (inl >> i) % (1 << 4)
   125  	}
   126  	out[15] = (inl >> 28)
   127  	binary.Read(in, binary.LittleEndian, &inl)
   128  	for i := 0; i < 28; i += 4 {
   129  		out[16+i/4] = (inl >> i) % (1 << 4)
   130  	}
   131  	out[23] = (inl >> 28)
   132  	binary.Read(in, binary.LittleEndian, &inl)
   133  	for i := 0; i < 28; i += 4 {
   134  		out[24+i/4] = (inl >> i) % (1 << 4)
   135  	}
   136  	out[31] = (inl >> 28)
   137  }
   138  
   139  func unpack5_32(in io.Reader, out []uint32) {
   140  	var inl uint32
   141  	binary.Read(in, binary.LittleEndian, &inl)
   142  	out[0] = (inl >> 0) % (1 << 5)
   143  	out[1] = (inl >> 5) % (1 << 5)
   144  	out[2] = (inl >> 10) % (1 << 5)
   145  	out[3] = (inl >> 15) % (1 << 5)
   146  	out[4] = (inl >> 20) % (1 << 5)
   147  	out[5] = (inl >> 25) % (1 << 5)
   148  	out[6] = (inl >> 30)
   149  	binary.Read(in, binary.LittleEndian, &inl)
   150  	out[6] |= (inl % (1 << 3)) << (5 - 3)
   151  	out[7] = (inl >> 3) % (1 << 5)
   152  	out[8] = (inl >> 8) % (1 << 5)
   153  	out[9] = (inl >> 13) % (1 << 5)
   154  	out[10] = (inl >> 18) % (1 << 5)
   155  	out[11] = (inl >> 23) % (1 << 5)
   156  	out[12] = (inl >> 28)
   157  	binary.Read(in, binary.LittleEndian, &inl)
   158  	out[12] |= (inl % (1 << 1)) << (5 - 1)
   159  	out[13] = (inl >> 1) % (1 << 5)
   160  	out[14] = (inl >> 6) % (1 << 5)
   161  	out[15] = (inl >> 11) % (1 << 5)
   162  	out[16] = (inl >> 16) % (1 << 5)
   163  	out[17] = (inl >> 21) % (1 << 5)
   164  	out[18] = (inl >> 26) % (1 << 5)
   165  	out[19] = (inl >> 31)
   166  	binary.Read(in, binary.LittleEndian, &inl)
   167  	out[19] |= (inl % (1 << 4)) << (5 - 4)
   168  	out[20] = (inl >> 4) % (1 << 5)
   169  	out[21] = (inl >> 9) % (1 << 5)
   170  	out[22] = (inl >> 14) % (1 << 5)
   171  	out[23] = (inl >> 19) % (1 << 5)
   172  	out[24] = (inl >> 24) % (1 << 5)
   173  	out[25] = (inl >> 29)
   174  	binary.Read(in, binary.LittleEndian, &inl)
   175  	out[25] |= (inl % (1 << 2)) << (5 - 2)
   176  	out[26] = (inl >> 2) % (1 << 5)
   177  	out[27] = (inl >> 7) % (1 << 5)
   178  	out[28] = (inl >> 12) % (1 << 5)
   179  	out[29] = (inl >> 17) % (1 << 5)
   180  	out[30] = (inl >> 22) % (1 << 5)
   181  	out[31] = (inl >> 27)
   182  }
   183  
   184  func unpack6_32(in io.Reader, out []uint32) {
   185  	var inl uint32
   186  	binary.Read(in, binary.LittleEndian, &inl)
   187  	out[0] = (inl >> 0) % (1 << 6)
   188  	out[1] = (inl >> 6) % (1 << 6)
   189  	out[2] = (inl >> 12) % (1 << 6)
   190  	out[3] = (inl >> 18) % (1 << 6)
   191  	out[4] = (inl >> 24) % (1 << 6)
   192  	out[5] = (inl >> 30)
   193  	binary.Read(in, binary.LittleEndian, &inl)
   194  	out[5] |= (inl % (1 << 4)) << (6 - 4)
   195  	out[6] = (inl >> 4) % (1 << 6)
   196  	out[7] = (inl >> 10) % (1 << 6)
   197  	out[8] = (inl >> 16) % (1 << 6)
   198  	out[9] = (inl >> 22) % (1 << 6)
   199  	out[10] = (inl >> 28)
   200  	binary.Read(in, binary.LittleEndian, &inl)
   201  	out[10] |= (inl % (1 << 2)) << (6 - 2)
   202  	out[11] = (inl >> 2) % (1 << 6)
   203  	out[12] = (inl >> 8) % (1 << 6)
   204  	out[13] = (inl >> 14) % (1 << 6)
   205  	out[14] = (inl >> 20) % (1 << 6)
   206  	out[15] = (inl >> 26)
   207  	binary.Read(in, binary.LittleEndian, &inl)
   208  	out[16] = (inl >> 0) % (1 << 6)
   209  	out[17] = (inl >> 6) % (1 << 6)
   210  	out[18] = (inl >> 12) % (1 << 6)
   211  	out[19] = (inl >> 18) % (1 << 6)
   212  	out[20] = (inl >> 24) % (1 << 6)
   213  	out[21] = (inl >> 30)
   214  	binary.Read(in, binary.LittleEndian, &inl)
   215  	out[21] |= (inl % (1 << 4)) << (6 - 4)
   216  	out[22] = (inl >> 4) % (1 << 6)
   217  	out[23] = (inl >> 10) % (1 << 6)
   218  	out[24] = (inl >> 16) % (1 << 6)
   219  	out[25] = (inl >> 22) % (1 << 6)
   220  	out[26] = (inl >> 28)
   221  	binary.Read(in, binary.LittleEndian, &inl)
   222  	out[26] |= (inl % (1 << 2)) << (6 - 2)
   223  	out[27] = (inl >> 2) % (1 << 6)
   224  	out[28] = (inl >> 8) % (1 << 6)
   225  	out[29] = (inl >> 14) % (1 << 6)
   226  	out[30] = (inl >> 20) % (1 << 6)
   227  	out[31] = (inl >> 26)
   228  }
   229  
   230  func unpack7_32(in io.Reader, out []uint32) {
   231  	var inl uint32
   232  	binary.Read(in, binary.LittleEndian, &inl)
   233  	out[0] = (inl >> 0) % (1 << 7)
   234  	out[1] = (inl >> 7) % (1 << 7)
   235  	out[2] = (inl >> 14) % (1 << 7)
   236  	out[3] = (inl >> 21) % (1 << 7)
   237  	out[4] = (inl >> 28)
   238  	binary.Read(in, binary.LittleEndian, &inl)
   239  	out[4] |= (inl % (1 << 3)) << (7 - 3)
   240  	out[5] = (inl >> 3) % (1 << 7)
   241  	out[6] = (inl >> 10) % (1 << 7)
   242  	out[7] = (inl >> 17) % (1 << 7)
   243  	out[8] = (inl >> 24) % (1 << 7)
   244  	out[9] = (inl >> 31)
   245  	binary.Read(in, binary.LittleEndian, &inl)
   246  	out[9] |= (inl % (1 << 6)) << (7 - 6)
   247  	out[10] = (inl >> 6) % (1 << 7)
   248  	out[11] = (inl >> 13) % (1 << 7)
   249  	out[12] = (inl >> 20) % (1 << 7)
   250  	out[13] = (inl >> 27)
   251  	binary.Read(in, binary.LittleEndian, &inl)
   252  	out[13] |= (inl % (1 << 2)) << (7 - 2)
   253  	out[14] = (inl >> 2) % (1 << 7)
   254  	out[15] = (inl >> 9) % (1 << 7)
   255  	out[16] = (inl >> 16) % (1 << 7)
   256  	out[17] = (inl >> 23) % (1 << 7)
   257  	out[18] = (inl >> 30)
   258  	binary.Read(in, binary.LittleEndian, &inl)
   259  	out[18] |= (inl % (1 << 5)) << (7 - 5)
   260  	out[19] = (inl >> 5) % (1 << 7)
   261  	out[20] = (inl >> 12) % (1 << 7)
   262  	out[21] = (inl >> 19) % (1 << 7)
   263  	out[22] = (inl >> 26)
   264  	binary.Read(in, binary.LittleEndian, &inl)
   265  	out[22] |= (inl % (1 << 1)) << (7 - 1)
   266  	out[23] = (inl >> 1) % (1 << 7)
   267  	out[24] = (inl >> 8) % (1 << 7)
   268  	out[25] = (inl >> 15) % (1 << 7)
   269  	out[26] = (inl >> 22) % (1 << 7)
   270  	out[27] = (inl >> 29)
   271  	binary.Read(in, binary.LittleEndian, &inl)
   272  	out[27] |= (inl % (1 << 4)) << (7 - 4)
   273  	out[28] = (inl >> 4) % (1 << 7)
   274  	out[29] = (inl >> 11) % (1 << 7)
   275  	out[30] = (inl >> 18) % (1 << 7)
   276  	out[31] = (inl >> 25)
   277  }
   278  
   279  func unpack8_32(in io.Reader, out []uint32) {
   280  	var inl uint32
   281  	binary.Read(in, binary.LittleEndian, &inl)
   282  	for i := 0; i < 24; i += 8 {
   283  		out[0+i/8] = (inl >> i) % (1 << 8)
   284  	}
   285  	out[3] = (inl >> 24)
   286  	binary.Read(in, binary.LittleEndian, &inl)
   287  	for i := 0; i < 24; i += 8 {
   288  		out[4+i/8] = (inl >> i) % (1 << 8)
   289  	}
   290  	out[7] = (inl >> 24)
   291  	binary.Read(in, binary.LittleEndian, &inl)
   292  	for i := 0; i < 24; i += 8 {
   293  		out[8+i/8] = (inl >> i) % (1 << 8)
   294  	}
   295  	out[11] = (inl >> 24)
   296  	binary.Read(in, binary.LittleEndian, &inl)
   297  	for i := 0; i < 24; i += 8 {
   298  		out[12+i/8] = (inl >> i) % (1 << 8)
   299  	}
   300  	out[15] = (inl >> 24)
   301  	binary.Read(in, binary.LittleEndian, &inl)
   302  	for i := 0; i < 24; i += 8 {
   303  		out[16+i/8] = (inl >> i) % (1 << 8)
   304  	}
   305  	out[19] = (inl >> 24)
   306  	binary.Read(in, binary.LittleEndian, &inl)
   307  	for i := 0; i < 24; i += 8 {
   308  		out[20+i/8] = (inl >> i) % (1 << 8)
   309  	}
   310  	out[23] = (inl >> 24)
   311  	binary.Read(in, binary.LittleEndian, &inl)
   312  	for i := 0; i < 24; i += 8 {
   313  		out[24+i/8] = (inl >> i) % (1 << 8)
   314  	}
   315  	out[27] = (inl >> 24)
   316  	binary.Read(in, binary.LittleEndian, &inl)
   317  	for i := 0; i < 24; i += 8 {
   318  		out[28+i/8] = (inl >> i) % (1 << 8)
   319  	}
   320  	out[31] = (inl >> 24)
   321  }
   322  
   323  func unpack9_32(in io.Reader, out []uint32) {
   324  	var inl uint32
   325  	binary.Read(in, binary.LittleEndian, &inl)
   326  	out[0] = (inl >> 0) % (1 << 9)
   327  	out[1] = (inl >> 9) % (1 << 9)
   328  	out[2] = (inl >> 18) % (1 << 9)
   329  	out[3] = (inl >> 27)
   330  	binary.Read(in, binary.LittleEndian, &inl)
   331  	out[3] |= (inl % (1 << 4)) << (9 - 4)
   332  	out[4] = (inl >> 4) % (1 << 9)
   333  	out[5] = (inl >> 13) % (1 << 9)
   334  	out[6] = (inl >> 22) % (1 << 9)
   335  	out[7] = (inl >> 31)
   336  	binary.Read(in, binary.LittleEndian, &inl)
   337  	out[7] |= (inl % (1 << 8)) << (9 - 8)
   338  	out[8] = (inl >> 8) % (1 << 9)
   339  	out[9] = (inl >> 17) % (1 << 9)
   340  	out[10] = (inl >> 26)
   341  	binary.Read(in, binary.LittleEndian, &inl)
   342  	out[10] |= (inl % (1 << 3)) << (9 - 3)
   343  	out[11] = (inl >> 3) % (1 << 9)
   344  	out[12] = (inl >> 12) % (1 << 9)
   345  	out[13] = (inl >> 21) % (1 << 9)
   346  	out[14] = (inl >> 30)
   347  	binary.Read(in, binary.LittleEndian, &inl)
   348  	out[14] |= (inl % (1 << 7)) << (9 - 7)
   349  	out[15] = (inl >> 7) % (1 << 9)
   350  	out[16] = (inl >> 16) % (1 << 9)
   351  	out[17] = (inl >> 25)
   352  	binary.Read(in, binary.LittleEndian, &inl)
   353  	out[17] |= (inl % (1 << 2)) << (9 - 2)
   354  	out[18] = (inl >> 2) % (1 << 9)
   355  	out[19] = (inl >> 11) % (1 << 9)
   356  	out[20] = (inl >> 20) % (1 << 9)
   357  	out[21] = (inl >> 29)
   358  	binary.Read(in, binary.LittleEndian, &inl)
   359  	out[21] |= (inl % (1 << 6)) << (9 - 6)
   360  	out[22] = (inl >> 6) % (1 << 9)
   361  	out[23] = (inl >> 15) % (1 << 9)
   362  	out[24] = (inl >> 24)
   363  	binary.Read(in, binary.LittleEndian, &inl)
   364  	out[24] |= (inl % (1 << 1)) << (9 - 1)
   365  	out[25] = (inl >> 1) % (1 << 9)
   366  	out[26] = (inl >> 10) % (1 << 9)
   367  	out[27] = (inl >> 19) % (1 << 9)
   368  	out[28] = (inl >> 28)
   369  	binary.Read(in, binary.LittleEndian, &inl)
   370  	out[28] |= (inl % (1 << 5)) << (9 - 5)
   371  	out[29] = (inl >> 5) % (1 << 9)
   372  	out[30] = (inl >> 14) % (1 << 9)
   373  	out[31] = (inl >> 23)
   374  }
   375  
   376  func unpack10_32(in io.Reader, out []uint32) {
   377  	var inl uint32
   378  	binary.Read(in, binary.LittleEndian, &inl)
   379  	out[0] = (inl >> 0) % (1 << 10)
   380  	out[1] = (inl >> 10) % (1 << 10)
   381  	out[2] = (inl >> 20) % (1 << 10)
   382  	out[3] = (inl >> 30)
   383  	binary.Read(in, binary.LittleEndian, &inl)
   384  	out[3] |= (inl % (1 << 8)) << (10 - 8)
   385  	out[4] = (inl >> 8) % (1 << 10)
   386  	out[5] = (inl >> 18) % (1 << 10)
   387  	out[6] = (inl >> 28)
   388  	binary.Read(in, binary.LittleEndian, &inl)
   389  	out[6] |= (inl % (1 << 6)) << (10 - 6)
   390  	out[7] = (inl >> 6) % (1 << 10)
   391  	out[8] = (inl >> 16) % (1 << 10)
   392  	out[9] = (inl >> 26)
   393  	binary.Read(in, binary.LittleEndian, &inl)
   394  	out[9] |= (inl % (1 << 4)) << (10 - 4)
   395  	out[10] = (inl >> 4) % (1 << 10)
   396  	out[11] = (inl >> 14) % (1 << 10)
   397  	out[12] = (inl >> 24)
   398  	binary.Read(in, binary.LittleEndian, &inl)
   399  	out[12] |= (inl % (1 << 2)) << (10 - 2)
   400  	out[13] = (inl >> 2) % (1 << 10)
   401  	out[14] = (inl >> 12) % (1 << 10)
   402  	out[15] = (inl >> 22)
   403  	binary.Read(in, binary.LittleEndian, &inl)
   404  	out[16] = (inl >> 0) % (1 << 10)
   405  	out[17] = (inl >> 10) % (1 << 10)
   406  	out[18] = (inl >> 20) % (1 << 10)
   407  	out[19] = (inl >> 30)
   408  	binary.Read(in, binary.LittleEndian, &inl)
   409  	out[19] |= (inl % (1 << 8)) << (10 - 8)
   410  	out[20] = (inl >> 8) % (1 << 10)
   411  	out[21] = (inl >> 18) % (1 << 10)
   412  	out[22] = (inl >> 28)
   413  	binary.Read(in, binary.LittleEndian, &inl)
   414  	out[22] |= (inl % (1 << 6)) << (10 - 6)
   415  	out[23] = (inl >> 6) % (1 << 10)
   416  	out[24] = (inl >> 16) % (1 << 10)
   417  	out[25] = (inl >> 26)
   418  	binary.Read(in, binary.LittleEndian, &inl)
   419  	out[25] |= (inl % (1 << 4)) << (10 - 4)
   420  	out[26] = (inl >> 4) % (1 << 10)
   421  	out[27] = (inl >> 14) % (1 << 10)
   422  	out[28] = (inl >> 24)
   423  	binary.Read(in, binary.LittleEndian, &inl)
   424  	out[28] |= (inl % (1 << 2)) << (10 - 2)
   425  	out[29] = (inl >> 2) % (1 << 10)
   426  	out[30] = (inl >> 12) % (1 << 10)
   427  	out[31] = (inl >> 22)
   428  }
   429  
   430  func unpack11_32(in io.Reader, out []uint32) {
   431  	var inl uint32
   432  	binary.Read(in, binary.LittleEndian, &inl)
   433  	out[0] = (inl >> 0) % (1 << 11)
   434  	out[1] = (inl >> 11) % (1 << 11)
   435  	out[2] = (inl >> 22)
   436  	binary.Read(in, binary.LittleEndian, &inl)
   437  	out[2] |= (inl % (1 << 1)) << (11 - 1)
   438  	out[3] = (inl >> 1) % (1 << 11)
   439  	out[4] = (inl >> 12) % (1 << 11)
   440  	out[5] = (inl >> 23)
   441  	binary.Read(in, binary.LittleEndian, &inl)
   442  	out[5] |= (inl % (1 << 2)) << (11 - 2)
   443  	out[6] = (inl >> 2) % (1 << 11)
   444  	out[7] = (inl >> 13) % (1 << 11)
   445  	out[8] = (inl >> 24)
   446  	binary.Read(in, binary.LittleEndian, &inl)
   447  	out[8] |= (inl % (1 << 3)) << (11 - 3)
   448  	out[9] = (inl >> 3) % (1 << 11)
   449  	out[10] = (inl >> 14) % (1 << 11)
   450  	out[11] = (inl >> 25)
   451  	binary.Read(in, binary.LittleEndian, &inl)
   452  	out[11] |= (inl % (1 << 4)) << (11 - 4)
   453  	out[12] = (inl >> 4) % (1 << 11)
   454  	out[13] = (inl >> 15) % (1 << 11)
   455  	out[14] = (inl >> 26)
   456  	binary.Read(in, binary.LittleEndian, &inl)
   457  	out[14] |= (inl % (1 << 5)) << (11 - 5)
   458  	out[15] = (inl >> 5) % (1 << 11)
   459  	out[16] = (inl >> 16) % (1 << 11)
   460  	out[17] = (inl >> 27)
   461  	binary.Read(in, binary.LittleEndian, &inl)
   462  	out[17] |= (inl % (1 << 6)) << (11 - 6)
   463  	out[18] = (inl >> 6) % (1 << 11)
   464  	out[19] = (inl >> 17) % (1 << 11)
   465  	out[20] = (inl >> 28)
   466  	binary.Read(in, binary.LittleEndian, &inl)
   467  	out[20] |= (inl % (1 << 7)) << (11 - 7)
   468  	out[21] = (inl >> 7) % (1 << 11)
   469  	out[22] = (inl >> 18) % (1 << 11)
   470  	out[23] = (inl >> 29)
   471  	binary.Read(in, binary.LittleEndian, &inl)
   472  	out[23] |= (inl % (1 << 8)) << (11 - 8)
   473  	out[24] = (inl >> 8) % (1 << 11)
   474  	out[25] = (inl >> 19) % (1 << 11)
   475  	out[26] = (inl >> 30)
   476  	binary.Read(in, binary.LittleEndian, &inl)
   477  	out[26] |= (inl % (1 << 9)) << (11 - 9)
   478  	out[27] = (inl >> 9) % (1 << 11)
   479  	out[28] = (inl >> 20) % (1 << 11)
   480  	out[29] = (inl >> 31)
   481  	binary.Read(in, binary.LittleEndian, &inl)
   482  	out[29] |= (inl % (1 << 10)) << (11 - 10)
   483  	out[30] = (inl >> 10) % (1 << 11)
   484  	out[31] = (inl >> 21)
   485  }
   486  
   487  func unpack12_32(in io.Reader, out []uint32) {
   488  	var inl uint32
   489  	binary.Read(in, binary.LittleEndian, &inl)
   490  	out[0] = (inl >> 0) % (1 << 12)
   491  	out[1] = (inl >> 12) % (1 << 12)
   492  	out[2] = (inl >> 24)
   493  	binary.Read(in, binary.LittleEndian, &inl)
   494  	out[2] |= (inl % (1 << 4)) << (12 - 4)
   495  	out[3] = (inl >> 4) % (1 << 12)
   496  	out[4] = (inl >> 16) % (1 << 12)
   497  	out[5] = (inl >> 28)
   498  	binary.Read(in, binary.LittleEndian, &inl)
   499  	out[5] |= (inl % (1 << 8)) << (12 - 8)
   500  	out[6] = (inl >> 8) % (1 << 12)
   501  	out[7] = (inl >> 20)
   502  	binary.Read(in, binary.LittleEndian, &inl)
   503  	out[8] = (inl >> 0) % (1 << 12)
   504  	out[9] = (inl >> 12) % (1 << 12)
   505  	out[10] = (inl >> 24)
   506  	binary.Read(in, binary.LittleEndian, &inl)
   507  	out[10] |= (inl % (1 << 4)) << (12 - 4)
   508  	out[11] = (inl >> 4) % (1 << 12)
   509  	out[12] = (inl >> 16) % (1 << 12)
   510  	out[13] = (inl >> 28)
   511  	binary.Read(in, binary.LittleEndian, &inl)
   512  	out[13] |= (inl % (1 << 8)) << (12 - 8)
   513  	out[14] = (inl >> 8) % (1 << 12)
   514  	out[15] = (inl >> 20)
   515  	binary.Read(in, binary.LittleEndian, &inl)
   516  	out[16] = (inl >> 0) % (1 << 12)
   517  	out[17] = (inl >> 12) % (1 << 12)
   518  	out[18] = (inl >> 24)
   519  	binary.Read(in, binary.LittleEndian, &inl)
   520  	out[18] |= (inl % (1 << 4)) << (12 - 4)
   521  	out[19] = (inl >> 4) % (1 << 12)
   522  	out[20] = (inl >> 16) % (1 << 12)
   523  	out[21] = (inl >> 28)
   524  	binary.Read(in, binary.LittleEndian, &inl)
   525  	out[21] |= (inl % (1 << 8)) << (12 - 8)
   526  	out[22] = (inl >> 8) % (1 << 12)
   527  	out[23] = (inl >> 20)
   528  	binary.Read(in, binary.LittleEndian, &inl)
   529  	out[24] = (inl >> 0) % (1 << 12)
   530  	out[25] = (inl >> 12) % (1 << 12)
   531  	out[26] = (inl >> 24)
   532  	binary.Read(in, binary.LittleEndian, &inl)
   533  	out[26] |= (inl % (1 << 4)) << (12 - 4)
   534  	out[27] = (inl >> 4) % (1 << 12)
   535  	out[28] = (inl >> 16) % (1 << 12)
   536  	out[29] = (inl >> 28)
   537  	binary.Read(in, binary.LittleEndian, &inl)
   538  	out[29] |= (inl % (1 << 8)) << (12 - 8)
   539  	out[30] = (inl >> 8) % (1 << 12)
   540  	out[31] = (inl >> 20)
   541  }
   542  
   543  func unpack13_32(in io.Reader, out []uint32) {
   544  	var inl uint32
   545  	binary.Read(in, binary.LittleEndian, &inl)
   546  	out[0] = (inl >> 0) % (1 << 13)
   547  	out[1] = (inl >> 13) % (1 << 13)
   548  	out[2] = (inl >> 26)
   549  	binary.Read(in, binary.LittleEndian, &inl)
   550  	out[2] |= (inl % (1 << 7)) << (13 - 7)
   551  	out[3] = (inl >> 7) % (1 << 13)
   552  	out[4] = (inl >> 20)
   553  	binary.Read(in, binary.LittleEndian, &inl)
   554  	out[4] |= (inl % (1 << 1)) << (13 - 1)
   555  	out[5] = (inl >> 1) % (1 << 13)
   556  	out[6] = (inl >> 14) % (1 << 13)
   557  	out[7] = (inl >> 27)
   558  	binary.Read(in, binary.LittleEndian, &inl)
   559  	out[7] |= (inl % (1 << 8)) << (13 - 8)
   560  	out[8] = (inl >> 8) % (1 << 13)
   561  	out[9] = (inl >> 21)
   562  	binary.Read(in, binary.LittleEndian, &inl)
   563  	out[9] |= (inl % (1 << 2)) << (13 - 2)
   564  	out[10] = (inl >> 2) % (1 << 13)
   565  	out[11] = (inl >> 15) % (1 << 13)
   566  	out[12] = (inl >> 28)
   567  	binary.Read(in, binary.LittleEndian, &inl)
   568  	out[12] |= (inl % (1 << 9)) << (13 - 9)
   569  	out[13] = (inl >> 9) % (1 << 13)
   570  	out[14] = (inl >> 22)
   571  	binary.Read(in, binary.LittleEndian, &inl)
   572  	out[14] |= (inl % (1 << 3)) << (13 - 3)
   573  	out[15] = (inl >> 3) % (1 << 13)
   574  	out[16] = (inl >> 16) % (1 << 13)
   575  	out[17] = (inl >> 29)
   576  	binary.Read(in, binary.LittleEndian, &inl)
   577  	out[17] |= (inl % (1 << 10)) << (13 - 10)
   578  	out[18] = (inl >> 10) % (1 << 13)
   579  	out[19] = (inl >> 23)
   580  	binary.Read(in, binary.LittleEndian, &inl)
   581  	out[19] |= (inl % (1 << 4)) << (13 - 4)
   582  	out[20] = (inl >> 4) % (1 << 13)
   583  	out[21] = (inl >> 17) % (1 << 13)
   584  	out[22] = (inl >> 30)
   585  	binary.Read(in, binary.LittleEndian, &inl)
   586  	out[22] |= (inl % (1 << 11)) << (13 - 11)
   587  	out[23] = (inl >> 11) % (1 << 13)
   588  	out[24] = (inl >> 24)
   589  	binary.Read(in, binary.LittleEndian, &inl)
   590  	out[24] |= (inl % (1 << 5)) << (13 - 5)
   591  	out[25] = (inl >> 5) % (1 << 13)
   592  	out[26] = (inl >> 18) % (1 << 13)
   593  	out[27] = (inl >> 31)
   594  	binary.Read(in, binary.LittleEndian, &inl)
   595  	out[27] |= (inl % (1 << 12)) << (13 - 12)
   596  	out[28] = (inl >> 12) % (1 << 13)
   597  	out[29] = (inl >> 25)
   598  	binary.Read(in, binary.LittleEndian, &inl)
   599  	out[29] |= (inl % (1 << 6)) << (13 - 6)
   600  	out[30] = (inl >> 6) % (1 << 13)
   601  	out[31] = (inl >> 19)
   602  }
   603  
   604  func unpack14_32(in io.Reader, out []uint32) {
   605  	var inl uint32
   606  	binary.Read(in, binary.LittleEndian, &inl)
   607  	out[0] = (inl >> 0) % (1 << 14)
   608  	out[1] = (inl >> 14) % (1 << 14)
   609  	out[2] = (inl >> 28)
   610  	binary.Read(in, binary.LittleEndian, &inl)
   611  	out[2] |= (inl % (1 << 10)) << (14 - 10)
   612  	out[3] = (inl >> 10) % (1 << 14)
   613  	out[4] = (inl >> 24)
   614  	binary.Read(in, binary.LittleEndian, &inl)
   615  	out[4] |= (inl % (1 << 6)) << (14 - 6)
   616  	out[5] = (inl >> 6) % (1 << 14)
   617  	out[6] = (inl >> 20)
   618  	binary.Read(in, binary.LittleEndian, &inl)
   619  	out[6] |= (inl % (1 << 2)) << (14 - 2)
   620  	out[7] = (inl >> 2) % (1 << 14)
   621  	out[8] = (inl >> 16) % (1 << 14)
   622  	out[9] = (inl >> 30)
   623  	binary.Read(in, binary.LittleEndian, &inl)
   624  	out[9] |= (inl % (1 << 12)) << (14 - 12)
   625  	out[10] = (inl >> 12) % (1 << 14)
   626  	out[11] = (inl >> 26)
   627  	binary.Read(in, binary.LittleEndian, &inl)
   628  	out[11] |= (inl % (1 << 8)) << (14 - 8)
   629  	out[12] = (inl >> 8) % (1 << 14)
   630  	out[13] = (inl >> 22)
   631  	binary.Read(in, binary.LittleEndian, &inl)
   632  	out[13] |= (inl % (1 << 4)) << (14 - 4)
   633  	out[14] = (inl >> 4) % (1 << 14)
   634  	out[15] = (inl >> 18)
   635  	binary.Read(in, binary.LittleEndian, &inl)
   636  	out[16] = (inl >> 0) % (1 << 14)
   637  	out[17] = (inl >> 14) % (1 << 14)
   638  	out[18] = (inl >> 28)
   639  	binary.Read(in, binary.LittleEndian, &inl)
   640  	out[18] |= (inl % (1 << 10)) << (14 - 10)
   641  	out[19] = (inl >> 10) % (1 << 14)
   642  	out[20] = (inl >> 24)
   643  	binary.Read(in, binary.LittleEndian, &inl)
   644  	out[20] |= (inl % (1 << 6)) << (14 - 6)
   645  	out[21] = (inl >> 6) % (1 << 14)
   646  	out[22] = (inl >> 20)
   647  	binary.Read(in, binary.LittleEndian, &inl)
   648  	out[22] |= (inl % (1 << 2)) << (14 - 2)
   649  	out[23] = (inl >> 2) % (1 << 14)
   650  	out[24] = (inl >> 16) % (1 << 14)
   651  	out[25] = (inl >> 30)
   652  	binary.Read(in, binary.LittleEndian, &inl)
   653  	out[25] |= (inl % (1 << 12)) << (14 - 12)
   654  	out[26] = (inl >> 12) % (1 << 14)
   655  	out[27] = (inl >> 26)
   656  	binary.Read(in, binary.LittleEndian, &inl)
   657  	out[27] |= (inl % (1 << 8)) << (14 - 8)
   658  	out[28] = (inl >> 8) % (1 << 14)
   659  	out[29] = (inl >> 22)
   660  	binary.Read(in, binary.LittleEndian, &inl)
   661  	out[29] |= (inl % (1 << 4)) << (14 - 4)
   662  	out[30] = (inl >> 4) % (1 << 14)
   663  	out[31] = (inl >> 18)
   664  }
   665  
   666  func unpack15_32(in io.Reader, out []uint32) {
   667  	var inl uint32
   668  	binary.Read(in, binary.LittleEndian, &inl)
   669  	out[0] = (inl >> 0) % (1 << 15)
   670  	out[1] = (inl >> 15) % (1 << 15)
   671  	out[2] = (inl >> 30)
   672  	binary.Read(in, binary.LittleEndian, &inl)
   673  	out[2] |= (inl % (1 << 13)) << (15 - 13)
   674  	out[3] = (inl >> 13) % (1 << 15)
   675  	out[4] = (inl >> 28)
   676  	binary.Read(in, binary.LittleEndian, &inl)
   677  	out[4] |= (inl % (1 << 11)) << (15 - 11)
   678  	out[5] = (inl >> 11) % (1 << 15)
   679  	out[6] = (inl >> 26)
   680  	binary.Read(in, binary.LittleEndian, &inl)
   681  	out[6] |= (inl % (1 << 9)) << (15 - 9)
   682  	out[7] = (inl >> 9) % (1 << 15)
   683  	out[8] = (inl >> 24)
   684  	binary.Read(in, binary.LittleEndian, &inl)
   685  	out[8] |= (inl % (1 << 7)) << (15 - 7)
   686  	out[9] = (inl >> 7) % (1 << 15)
   687  	out[10] = (inl >> 22)
   688  	binary.Read(in, binary.LittleEndian, &inl)
   689  	out[10] |= (inl % (1 << 5)) << (15 - 5)
   690  	out[11] = (inl >> 5) % (1 << 15)
   691  	out[12] = (inl >> 20)
   692  	binary.Read(in, binary.LittleEndian, &inl)
   693  	out[12] |= (inl % (1 << 3)) << (15 - 3)
   694  	out[13] = (inl >> 3) % (1 << 15)
   695  	out[14] = (inl >> 18)
   696  	binary.Read(in, binary.LittleEndian, &inl)
   697  	out[14] |= (inl % (1 << 1)) << (15 - 1)
   698  	out[15] = (inl >> 1) % (1 << 15)
   699  	out[16] = (inl >> 16) % (1 << 15)
   700  	out[17] = (inl >> 31)
   701  	binary.Read(in, binary.LittleEndian, &inl)
   702  	out[17] |= (inl % (1 << 14)) << (15 - 14)
   703  	out[18] = (inl >> 14) % (1 << 15)
   704  	out[19] = (inl >> 29)
   705  	binary.Read(in, binary.LittleEndian, &inl)
   706  	out[19] |= (inl % (1 << 12)) << (15 - 12)
   707  	out[20] = (inl >> 12) % (1 << 15)
   708  	out[21] = (inl >> 27)
   709  	binary.Read(in, binary.LittleEndian, &inl)
   710  	out[21] |= (inl % (1 << 10)) << (15 - 10)
   711  	out[22] = (inl >> 10) % (1 << 15)
   712  	out[23] = (inl >> 25)
   713  	binary.Read(in, binary.LittleEndian, &inl)
   714  	out[23] |= (inl % (1 << 8)) << (15 - 8)
   715  	out[24] = (inl >> 8) % (1 << 15)
   716  	out[25] = (inl >> 23)
   717  	binary.Read(in, binary.LittleEndian, &inl)
   718  	out[25] |= (inl % (1 << 6)) << (15 - 6)
   719  	out[26] = (inl >> 6) % (1 << 15)
   720  	out[27] = (inl >> 21)
   721  	binary.Read(in, binary.LittleEndian, &inl)
   722  	out[27] |= (inl % (1 << 4)) << (15 - 4)
   723  	out[28] = (inl >> 4) % (1 << 15)
   724  	out[29] = (inl >> 19)
   725  	binary.Read(in, binary.LittleEndian, &inl)
   726  	out[29] |= (inl % (1 << 2)) << (15 - 2)
   727  	out[30] = (inl >> 2) % (1 << 15)
   728  	out[31] = (inl >> 17)
   729  }
   730  
   731  func unpack16_32(in io.Reader, out []uint32) {
   732  	var inl uint32
   733  	for i := 0; i < 16; i++ {
   734  		binary.Read(in, binary.LittleEndian, &inl)
   735  		out[i*2] = (inl >> 0) % (1 << 16)
   736  		out[(i*2)+1] = (inl >> 16)
   737  	}
   738  }
   739  
   740  func unpack17_32(in io.Reader, out []uint32) {
   741  	var inl uint32
   742  	binary.Read(in, binary.LittleEndian, &inl)
   743  	out[0] = (inl >> 0) % (1 << 17)
   744  	out[1] = (inl >> 17)
   745  	binary.Read(in, binary.LittleEndian, &inl)
   746  	out[1] |= (inl % (1 << 2)) << (17 - 2)
   747  	out[2] = (inl >> 2) % (1 << 17)
   748  	out[3] = (inl >> 19)
   749  	binary.Read(in, binary.LittleEndian, &inl)
   750  	out[3] |= (inl % (1 << 4)) << (17 - 4)
   751  	out[4] = (inl >> 4) % (1 << 17)
   752  	out[5] = (inl >> 21)
   753  	binary.Read(in, binary.LittleEndian, &inl)
   754  	out[5] |= (inl % (1 << 6)) << (17 - 6)
   755  	out[6] = (inl >> 6) % (1 << 17)
   756  	out[7] = (inl >> 23)
   757  	binary.Read(in, binary.LittleEndian, &inl)
   758  	out[7] |= (inl % (1 << 8)) << (17 - 8)
   759  	out[8] = (inl >> 8) % (1 << 17)
   760  	out[9] = (inl >> 25)
   761  	binary.Read(in, binary.LittleEndian, &inl)
   762  	out[9] |= (inl % (1 << 10)) << (17 - 10)
   763  	out[10] = (inl >> 10) % (1 << 17)
   764  	out[11] = (inl >> 27)
   765  	binary.Read(in, binary.LittleEndian, &inl)
   766  	out[11] |= (inl % (1 << 12)) << (17 - 12)
   767  	out[12] = (inl >> 12) % (1 << 17)
   768  	out[13] = (inl >> 29)
   769  	binary.Read(in, binary.LittleEndian, &inl)
   770  	out[13] |= (inl % (1 << 14)) << (17 - 14)
   771  	out[14] = (inl >> 14) % (1 << 17)
   772  	out[15] = (inl >> 31)
   773  	binary.Read(in, binary.LittleEndian, &inl)
   774  	out[15] |= (inl % (1 << 16)) << (17 - 16)
   775  	out[16] = (inl >> 16)
   776  	binary.Read(in, binary.LittleEndian, &inl)
   777  	out[16] |= (inl % (1 << 1)) << (17 - 1)
   778  	out[17] = (inl >> 1) % (1 << 17)
   779  	out[18] = (inl >> 18)
   780  	binary.Read(in, binary.LittleEndian, &inl)
   781  	out[18] |= (inl % (1 << 3)) << (17 - 3)
   782  	out[19] = (inl >> 3) % (1 << 17)
   783  	out[20] = (inl >> 20)
   784  	binary.Read(in, binary.LittleEndian, &inl)
   785  	out[20] |= (inl % (1 << 5)) << (17 - 5)
   786  	out[21] = (inl >> 5) % (1 << 17)
   787  	out[22] = (inl >> 22)
   788  	binary.Read(in, binary.LittleEndian, &inl)
   789  	out[22] |= (inl % (1 << 7)) << (17 - 7)
   790  	out[23] = (inl >> 7) % (1 << 17)
   791  	out[24] = (inl >> 24)
   792  	binary.Read(in, binary.LittleEndian, &inl)
   793  	out[24] |= (inl % (1 << 9)) << (17 - 9)
   794  	out[25] = (inl >> 9) % (1 << 17)
   795  	out[26] = (inl >> 26)
   796  	binary.Read(in, binary.LittleEndian, &inl)
   797  	out[26] |= (inl % (1 << 11)) << (17 - 11)
   798  	out[27] = (inl >> 11) % (1 << 17)
   799  	out[28] = (inl >> 28)
   800  	binary.Read(in, binary.LittleEndian, &inl)
   801  	out[28] |= (inl % (1 << 13)) << (17 - 13)
   802  	out[29] = (inl >> 13) % (1 << 17)
   803  	out[30] = (inl >> 30)
   804  	binary.Read(in, binary.LittleEndian, &inl)
   805  	out[30] |= (inl % (1 << 15)) << (17 - 15)
   806  	out[31] = (inl >> 15)
   807  }
   808  
   809  func unpack18_32(in io.Reader, out []uint32) {
   810  	var inl uint32
   811  	binary.Read(in, binary.LittleEndian, &inl)
   812  	out[0] = (inl >> 0) % (1 << 18)
   813  	out[1] = (inl >> 18)
   814  	binary.Read(in, binary.LittleEndian, &inl)
   815  	out[1] |= (inl % (1 << 4)) << (18 - 4)
   816  	out[2] = (inl >> 4) % (1 << 18)
   817  	out[3] = (inl >> 22)
   818  	binary.Read(in, binary.LittleEndian, &inl)
   819  	out[3] |= (inl % (1 << 8)) << (18 - 8)
   820  	out[4] = (inl >> 8) % (1 << 18)
   821  	out[5] = (inl >> 26)
   822  	binary.Read(in, binary.LittleEndian, &inl)
   823  	out[5] |= (inl % (1 << 12)) << (18 - 12)
   824  	out[6] = (inl >> 12) % (1 << 18)
   825  	out[7] = (inl >> 30)
   826  	binary.Read(in, binary.LittleEndian, &inl)
   827  	out[7] |= (inl % (1 << 16)) << (18 - 16)
   828  	out[8] = (inl >> 16)
   829  	binary.Read(in, binary.LittleEndian, &inl)
   830  	out[8] |= (inl % (1 << 2)) << (18 - 2)
   831  	out[9] = (inl >> 2) % (1 << 18)
   832  	out[10] = (inl >> 20)
   833  	binary.Read(in, binary.LittleEndian, &inl)
   834  	out[10] |= (inl % (1 << 6)) << (18 - 6)
   835  	out[11] = (inl >> 6) % (1 << 18)
   836  	out[12] = (inl >> 24)
   837  	binary.Read(in, binary.LittleEndian, &inl)
   838  	out[12] |= (inl % (1 << 10)) << (18 - 10)
   839  	out[13] = (inl >> 10) % (1 << 18)
   840  	out[14] = (inl >> 28)
   841  	binary.Read(in, binary.LittleEndian, &inl)
   842  	out[14] |= (inl % (1 << 14)) << (18 - 14)
   843  	out[15] = (inl >> 14)
   844  	binary.Read(in, binary.LittleEndian, &inl)
   845  	out[16] = (inl >> 0) % (1 << 18)
   846  	out[17] = (inl >> 18)
   847  	binary.Read(in, binary.LittleEndian, &inl)
   848  	out[17] |= (inl % (1 << 4)) << (18 - 4)
   849  	out[18] = (inl >> 4) % (1 << 18)
   850  	out[19] = (inl >> 22)
   851  	binary.Read(in, binary.LittleEndian, &inl)
   852  	out[19] |= (inl % (1 << 8)) << (18 - 8)
   853  	out[20] = (inl >> 8) % (1 << 18)
   854  	out[21] = (inl >> 26)
   855  	binary.Read(in, binary.LittleEndian, &inl)
   856  	out[21] |= (inl % (1 << 12)) << (18 - 12)
   857  	out[22] = (inl >> 12) % (1 << 18)
   858  	out[23] = (inl >> 30)
   859  	binary.Read(in, binary.LittleEndian, &inl)
   860  	out[23] |= (inl % (1 << 16)) << (18 - 16)
   861  	out[24] = (inl >> 16)
   862  	binary.Read(in, binary.LittleEndian, &inl)
   863  	out[24] |= (inl % (1 << 2)) << (18 - 2)
   864  	out[25] = (inl >> 2) % (1 << 18)
   865  	out[26] = (inl >> 20)
   866  	binary.Read(in, binary.LittleEndian, &inl)
   867  	out[26] |= (inl % (1 << 6)) << (18 - 6)
   868  	out[27] = (inl >> 6) % (1 << 18)
   869  	out[28] = (inl >> 24)
   870  	binary.Read(in, binary.LittleEndian, &inl)
   871  	out[28] |= (inl % (1 << 10)) << (18 - 10)
   872  	out[29] = (inl >> 10) % (1 << 18)
   873  	out[30] = (inl >> 28)
   874  	binary.Read(in, binary.LittleEndian, &inl)
   875  	out[30] |= (inl % (1 << 14)) << (18 - 14)
   876  	out[31] = (inl >> 14)
   877  }
   878  
   879  func unpack19_32(in io.Reader, out []uint32) {
   880  	var inl uint32
   881  	binary.Read(in, binary.LittleEndian, &inl)
   882  	out[0] = (inl >> 0) % (1 << 19)
   883  	out[1] = (inl >> 19)
   884  	binary.Read(in, binary.LittleEndian, &inl)
   885  	out[1] |= (inl % (1 << 6)) << (19 - 6)
   886  	out[2] = (inl >> 6) % (1 << 19)
   887  	out[3] = (inl >> 25)
   888  	binary.Read(in, binary.LittleEndian, &inl)
   889  	out[3] |= (inl % (1 << 12)) << (19 - 12)
   890  	out[4] = (inl >> 12) % (1 << 19)
   891  	out[5] = (inl >> 31)
   892  	binary.Read(in, binary.LittleEndian, &inl)
   893  	out[5] |= (inl % (1 << 18)) << (19 - 18)
   894  	out[6] = (inl >> 18)
   895  	binary.Read(in, binary.LittleEndian, &inl)
   896  	out[6] |= (inl % (1 << 5)) << (19 - 5)
   897  	out[7] = (inl >> 5) % (1 << 19)
   898  	out[8] = (inl >> 24)
   899  	binary.Read(in, binary.LittleEndian, &inl)
   900  	out[8] |= (inl % (1 << 11)) << (19 - 11)
   901  	out[9] = (inl >> 11) % (1 << 19)
   902  	out[10] = (inl >> 30)
   903  	binary.Read(in, binary.LittleEndian, &inl)
   904  	out[10] |= (inl % (1 << 17)) << (19 - 17)
   905  	out[11] = (inl >> 17)
   906  	binary.Read(in, binary.LittleEndian, &inl)
   907  	out[11] |= (inl % (1 << 4)) << (19 - 4)
   908  	out[12] = (inl >> 4) % (1 << 19)
   909  	out[13] = (inl >> 23)
   910  	binary.Read(in, binary.LittleEndian, &inl)
   911  	out[13] |= (inl % (1 << 10)) << (19 - 10)
   912  	out[14] = (inl >> 10) % (1 << 19)
   913  	out[15] = (inl >> 29)
   914  	binary.Read(in, binary.LittleEndian, &inl)
   915  	out[15] |= (inl % (1 << 16)) << (19 - 16)
   916  	out[16] = (inl >> 16)
   917  	binary.Read(in, binary.LittleEndian, &inl)
   918  	out[16] |= (inl % (1 << 3)) << (19 - 3)
   919  	out[17] = (inl >> 3) % (1 << 19)
   920  	out[18] = (inl >> 22)
   921  	binary.Read(in, binary.LittleEndian, &inl)
   922  	out[18] |= (inl % (1 << 9)) << (19 - 9)
   923  	out[19] = (inl >> 9) % (1 << 19)
   924  	out[20] = (inl >> 28)
   925  	binary.Read(in, binary.LittleEndian, &inl)
   926  	out[20] |= (inl % (1 << 15)) << (19 - 15)
   927  	out[21] = (inl >> 15)
   928  	binary.Read(in, binary.LittleEndian, &inl)
   929  	out[21] |= (inl % (1 << 2)) << (19 - 2)
   930  	out[22] = (inl >> 2) % (1 << 19)
   931  	out[23] = (inl >> 21)
   932  	binary.Read(in, binary.LittleEndian, &inl)
   933  	out[23] |= (inl % (1 << 8)) << (19 - 8)
   934  	out[24] = (inl >> 8) % (1 << 19)
   935  	out[25] = (inl >> 27)
   936  	binary.Read(in, binary.LittleEndian, &inl)
   937  	out[25] |= (inl % (1 << 14)) << (19 - 14)
   938  	out[26] = (inl >> 14)
   939  	binary.Read(in, binary.LittleEndian, &inl)
   940  	out[26] |= (inl % (1 << 1)) << (19 - 1)
   941  	out[27] = (inl >> 1) % (1 << 19)
   942  	out[28] = (inl >> 20)
   943  	binary.Read(in, binary.LittleEndian, &inl)
   944  	out[28] |= (inl % (1 << 7)) << (19 - 7)
   945  	out[29] = (inl >> 7) % (1 << 19)
   946  	out[30] = (inl >> 26)
   947  	binary.Read(in, binary.LittleEndian, &inl)
   948  	out[30] |= (inl % (1 << 13)) << (19 - 13)
   949  	out[31] = (inl >> 13)
   950  }
   951  
   952  func unpack20_32(in io.Reader, out []uint32) {
   953  	var inl uint32
   954  	binary.Read(in, binary.LittleEndian, &inl)
   955  	out[0] = (inl >> 0) % (1 << 20)
   956  	out[1] = (inl >> 20)
   957  	binary.Read(in, binary.LittleEndian, &inl)
   958  	out[1] |= (inl % (1 << 8)) << (20 - 8)
   959  	out[2] = (inl >> 8) % (1 << 20)
   960  	out[3] = (inl >> 28)
   961  	binary.Read(in, binary.LittleEndian, &inl)
   962  	out[3] |= (inl % (1 << 16)) << (20 - 16)
   963  	out[4] = (inl >> 16)
   964  	binary.Read(in, binary.LittleEndian, &inl)
   965  	out[4] |= (inl % (1 << 4)) << (20 - 4)
   966  	out[5] = (inl >> 4) % (1 << 20)
   967  	out[6] = (inl >> 24)
   968  	binary.Read(in, binary.LittleEndian, &inl)
   969  	out[6] |= (inl % (1 << 12)) << (20 - 12)
   970  	out[7] = (inl >> 12)
   971  	binary.Read(in, binary.LittleEndian, &inl)
   972  	out[8] = (inl >> 0) % (1 << 20)
   973  	out[9] = (inl >> 20)
   974  	binary.Read(in, binary.LittleEndian, &inl)
   975  	out[9] |= (inl % (1 << 8)) << (20 - 8)
   976  	out[10] = (inl >> 8) % (1 << 20)
   977  	out[11] = (inl >> 28)
   978  	binary.Read(in, binary.LittleEndian, &inl)
   979  	out[11] |= (inl % (1 << 16)) << (20 - 16)
   980  	out[12] = (inl >> 16)
   981  	binary.Read(in, binary.LittleEndian, &inl)
   982  	out[12] |= (inl % (1 << 4)) << (20 - 4)
   983  	out[13] = (inl >> 4) % (1 << 20)
   984  	out[14] = (inl >> 24)
   985  	binary.Read(in, binary.LittleEndian, &inl)
   986  	out[14] |= (inl % (1 << 12)) << (20 - 12)
   987  	out[15] = (inl >> 12)
   988  	binary.Read(in, binary.LittleEndian, &inl)
   989  	out[16] = (inl >> 0) % (1 << 20)
   990  	out[17] = (inl >> 20)
   991  	binary.Read(in, binary.LittleEndian, &inl)
   992  	out[17] |= (inl % (1 << 8)) << (20 - 8)
   993  	out[18] = (inl >> 8) % (1 << 20)
   994  	out[19] = (inl >> 28)
   995  	binary.Read(in, binary.LittleEndian, &inl)
   996  	out[19] |= (inl % (1 << 16)) << (20 - 16)
   997  	out[20] = (inl >> 16)
   998  	binary.Read(in, binary.LittleEndian, &inl)
   999  	out[20] |= (inl % (1 << 4)) << (20 - 4)
  1000  	out[21] = (inl >> 4) % (1 << 20)
  1001  	out[22] = (inl >> 24)
  1002  	binary.Read(in, binary.LittleEndian, &inl)
  1003  	out[22] |= (inl % (1 << 12)) << (20 - 12)
  1004  	out[23] = (inl >> 12)
  1005  	binary.Read(in, binary.LittleEndian, &inl)
  1006  	out[24] = (inl >> 0) % (1 << 20)
  1007  	out[25] = (inl >> 20)
  1008  	binary.Read(in, binary.LittleEndian, &inl)
  1009  	out[25] |= (inl % (1 << 8)) << (20 - 8)
  1010  	out[26] = (inl >> 8) % (1 << 20)
  1011  	out[27] = (inl >> 28)
  1012  	binary.Read(in, binary.LittleEndian, &inl)
  1013  	out[27] |= (inl % (1 << 16)) << (20 - 16)
  1014  	out[28] = (inl >> 16)
  1015  	binary.Read(in, binary.LittleEndian, &inl)
  1016  	out[28] |= (inl % (1 << 4)) << (20 - 4)
  1017  	out[29] = (inl >> 4) % (1 << 20)
  1018  	out[30] = (inl >> 24)
  1019  	binary.Read(in, binary.LittleEndian, &inl)
  1020  	out[30] |= (inl % (1 << 12)) << (20 - 12)
  1021  	out[31] = (inl >> 12)
  1022  }
  1023  
  1024  func unpack21_32(in io.Reader, out []uint32) {
  1025  	var inl uint32
  1026  	binary.Read(in, binary.LittleEndian, &inl)
  1027  	out[0] = (inl >> 0) % (1 << 21)
  1028  	out[1] = (inl >> 21)
  1029  	binary.Read(in, binary.LittleEndian, &inl)
  1030  	out[1] |= (inl % (1 << 10)) << (21 - 10)
  1031  	out[2] = (inl >> 10) % (1 << 21)
  1032  	out[3] = (inl >> 31)
  1033  	binary.Read(in, binary.LittleEndian, &inl)
  1034  	out[3] |= (inl % (1 << 20)) << (21 - 20)
  1035  	out[4] = (inl >> 20)
  1036  	binary.Read(in, binary.LittleEndian, &inl)
  1037  	out[4] |= (inl % (1 << 9)) << (21 - 9)
  1038  	out[5] = (inl >> 9) % (1 << 21)
  1039  	out[6] = (inl >> 30)
  1040  	binary.Read(in, binary.LittleEndian, &inl)
  1041  	out[6] |= (inl % (1 << 19)) << (21 - 19)
  1042  	out[7] = (inl >> 19)
  1043  	binary.Read(in, binary.LittleEndian, &inl)
  1044  	out[7] |= (inl % (1 << 8)) << (21 - 8)
  1045  	out[8] = (inl >> 8) % (1 << 21)
  1046  	out[9] = (inl >> 29)
  1047  	binary.Read(in, binary.LittleEndian, &inl)
  1048  	out[9] |= (inl % (1 << 18)) << (21 - 18)
  1049  	out[10] = (inl >> 18)
  1050  	binary.Read(in, binary.LittleEndian, &inl)
  1051  	out[10] |= (inl % (1 << 7)) << (21 - 7)
  1052  	out[11] = (inl >> 7) % (1 << 21)
  1053  	out[12] = (inl >> 28)
  1054  	binary.Read(in, binary.LittleEndian, &inl)
  1055  	out[12] |= (inl % (1 << 17)) << (21 - 17)
  1056  	out[13] = (inl >> 17)
  1057  	binary.Read(in, binary.LittleEndian, &inl)
  1058  	out[13] |= (inl % (1 << 6)) << (21 - 6)
  1059  	out[14] = (inl >> 6) % (1 << 21)
  1060  	out[15] = (inl >> 27)
  1061  	binary.Read(in, binary.LittleEndian, &inl)
  1062  	out[15] |= (inl % (1 << 16)) << (21 - 16)
  1063  	out[16] = (inl >> 16)
  1064  	binary.Read(in, binary.LittleEndian, &inl)
  1065  	out[16] |= (inl % (1 << 5)) << (21 - 5)
  1066  	out[17] = (inl >> 5) % (1 << 21)
  1067  	out[18] = (inl >> 26)
  1068  	binary.Read(in, binary.LittleEndian, &inl)
  1069  	out[18] |= (inl % (1 << 15)) << (21 - 15)
  1070  	out[19] = (inl >> 15)
  1071  	binary.Read(in, binary.LittleEndian, &inl)
  1072  	out[19] |= (inl % (1 << 4)) << (21 - 4)
  1073  	out[20] = (inl >> 4) % (1 << 21)
  1074  	out[21] = (inl >> 25)
  1075  	binary.Read(in, binary.LittleEndian, &inl)
  1076  	out[21] |= (inl % (1 << 14)) << (21 - 14)
  1077  	out[22] = (inl >> 14)
  1078  	binary.Read(in, binary.LittleEndian, &inl)
  1079  	out[22] |= (inl % (1 << 3)) << (21 - 3)
  1080  	out[23] = (inl >> 3) % (1 << 21)
  1081  	out[24] = (inl >> 24)
  1082  	binary.Read(in, binary.LittleEndian, &inl)
  1083  	out[24] |= (inl % (1 << 13)) << (21 - 13)
  1084  	out[25] = (inl >> 13)
  1085  	binary.Read(in, binary.LittleEndian, &inl)
  1086  	out[25] |= (inl % (1 << 2)) << (21 - 2)
  1087  	out[26] = (inl >> 2) % (1 << 21)
  1088  	out[27] = (inl >> 23)
  1089  	binary.Read(in, binary.LittleEndian, &inl)
  1090  	out[27] |= (inl % (1 << 12)) << (21 - 12)
  1091  	out[28] = (inl >> 12)
  1092  	binary.Read(in, binary.LittleEndian, &inl)
  1093  	out[28] |= (inl % (1 << 1)) << (21 - 1)
  1094  	out[29] = (inl >> 1) % (1 << 21)
  1095  	out[30] = (inl >> 22)
  1096  	binary.Read(in, binary.LittleEndian, &inl)
  1097  	out[30] |= (inl % (1 << 11)) << (21 - 11)
  1098  	out[31] = (inl >> 11)
  1099  }
  1100  
  1101  func unpack22_32(in io.Reader, out []uint32) {
  1102  	var inl uint32
  1103  	binary.Read(in, binary.LittleEndian, &inl)
  1104  	out[0] = (inl >> 0) % (1 << 22)
  1105  	out[1] = (inl >> 22)
  1106  	binary.Read(in, binary.LittleEndian, &inl)
  1107  	out[1] |= (inl % (1 << 12)) << (22 - 12)
  1108  	out[2] = (inl >> 12)
  1109  	binary.Read(in, binary.LittleEndian, &inl)
  1110  	out[2] |= (inl % (1 << 2)) << (22 - 2)
  1111  	out[3] = (inl >> 2) % (1 << 22)
  1112  	out[4] = (inl >> 24)
  1113  	binary.Read(in, binary.LittleEndian, &inl)
  1114  	out[4] |= (inl % (1 << 14)) << (22 - 14)
  1115  	out[5] = (inl >> 14)
  1116  	binary.Read(in, binary.LittleEndian, &inl)
  1117  	out[5] |= (inl % (1 << 4)) << (22 - 4)
  1118  	out[6] = (inl >> 4) % (1 << 22)
  1119  	out[7] = (inl >> 26)
  1120  	binary.Read(in, binary.LittleEndian, &inl)
  1121  	out[7] |= (inl % (1 << 16)) << (22 - 16)
  1122  	out[8] = (inl >> 16)
  1123  	binary.Read(in, binary.LittleEndian, &inl)
  1124  	out[8] |= (inl % (1 << 6)) << (22 - 6)
  1125  	out[9] = (inl >> 6) % (1 << 22)
  1126  	out[10] = (inl >> 28)
  1127  	binary.Read(in, binary.LittleEndian, &inl)
  1128  	out[10] |= (inl % (1 << 18)) << (22 - 18)
  1129  	out[11] = (inl >> 18)
  1130  	binary.Read(in, binary.LittleEndian, &inl)
  1131  	out[11] |= (inl % (1 << 8)) << (22 - 8)
  1132  	out[12] = (inl >> 8) % (1 << 22)
  1133  	out[13] = (inl >> 30)
  1134  	binary.Read(in, binary.LittleEndian, &inl)
  1135  	out[13] |= (inl % (1 << 20)) << (22 - 20)
  1136  	out[14] = (inl >> 20)
  1137  	binary.Read(in, binary.LittleEndian, &inl)
  1138  	out[14] |= (inl % (1 << 10)) << (22 - 10)
  1139  	out[15] = (inl >> 10)
  1140  	binary.Read(in, binary.LittleEndian, &inl)
  1141  	out[16] = (inl >> 0) % (1 << 22)
  1142  	out[17] = (inl >> 22)
  1143  	binary.Read(in, binary.LittleEndian, &inl)
  1144  	out[17] |= (inl % (1 << 12)) << (22 - 12)
  1145  	out[18] = (inl >> 12)
  1146  	binary.Read(in, binary.LittleEndian, &inl)
  1147  	out[18] |= (inl % (1 << 2)) << (22 - 2)
  1148  	out[19] = (inl >> 2) % (1 << 22)
  1149  	out[20] = (inl >> 24)
  1150  	binary.Read(in, binary.LittleEndian, &inl)
  1151  	out[20] |= (inl % (1 << 14)) << (22 - 14)
  1152  	out[21] = (inl >> 14)
  1153  	binary.Read(in, binary.LittleEndian, &inl)
  1154  	out[21] |= (inl % (1 << 4)) << (22 - 4)
  1155  	out[22] = (inl >> 4) % (1 << 22)
  1156  	out[23] = (inl >> 26)
  1157  	binary.Read(in, binary.LittleEndian, &inl)
  1158  	out[23] |= (inl % (1 << 16)) << (22 - 16)
  1159  	out[24] = (inl >> 16)
  1160  	binary.Read(in, binary.LittleEndian, &inl)
  1161  	out[24] |= (inl % (1 << 6)) << (22 - 6)
  1162  	out[25] = (inl >> 6) % (1 << 22)
  1163  	out[26] = (inl >> 28)
  1164  	binary.Read(in, binary.LittleEndian, &inl)
  1165  	out[26] |= (inl % (1 << 18)) << (22 - 18)
  1166  	out[27] = (inl >> 18)
  1167  	binary.Read(in, binary.LittleEndian, &inl)
  1168  	out[27] |= (inl % (1 << 8)) << (22 - 8)
  1169  	out[28] = (inl >> 8) % (1 << 22)
  1170  	out[29] = (inl >> 30)
  1171  	binary.Read(in, binary.LittleEndian, &inl)
  1172  	out[29] |= (inl % (1 << 20)) << (22 - 20)
  1173  	out[30] = (inl >> 20)
  1174  	binary.Read(in, binary.LittleEndian, &inl)
  1175  	out[30] |= (inl % (1 << 10)) << (22 - 10)
  1176  	out[31] = (inl >> 10)
  1177  }
  1178  
  1179  func unpack23_32(in io.Reader, out []uint32) {
  1180  	var inl uint32
  1181  	binary.Read(in, binary.LittleEndian, &inl)
  1182  	out[0] = (inl >> 0) % (1 << 23)
  1183  	out[1] = (inl >> 23)
  1184  	binary.Read(in, binary.LittleEndian, &inl)
  1185  	out[1] |= (inl % (1 << 14)) << (23 - 14)
  1186  	out[2] = (inl >> 14)
  1187  	binary.Read(in, binary.LittleEndian, &inl)
  1188  	out[2] |= (inl % (1 << 5)) << (23 - 5)
  1189  	out[3] = (inl >> 5) % (1 << 23)
  1190  	out[4] = (inl >> 28)
  1191  	binary.Read(in, binary.LittleEndian, &inl)
  1192  	out[4] |= (inl % (1 << 19)) << (23 - 19)
  1193  	out[5] = (inl >> 19)
  1194  	binary.Read(in, binary.LittleEndian, &inl)
  1195  	out[5] |= (inl % (1 << 10)) << (23 - 10)
  1196  	out[6] = (inl >> 10)
  1197  	binary.Read(in, binary.LittleEndian, &inl)
  1198  	out[6] |= (inl % (1 << 1)) << (23 - 1)
  1199  	out[7] = (inl >> 1) % (1 << 23)
  1200  	out[8] = (inl >> 24)
  1201  	binary.Read(in, binary.LittleEndian, &inl)
  1202  	out[8] |= (inl % (1 << 15)) << (23 - 15)
  1203  	out[9] = (inl >> 15)
  1204  	binary.Read(in, binary.LittleEndian, &inl)
  1205  	out[9] |= (inl % (1 << 6)) << (23 - 6)
  1206  	out[10] = (inl >> 6) % (1 << 23)
  1207  	out[11] = (inl >> 29)
  1208  	binary.Read(in, binary.LittleEndian, &inl)
  1209  	out[11] |= (inl % (1 << 20)) << (23 - 20)
  1210  	out[12] = (inl >> 20)
  1211  	binary.Read(in, binary.LittleEndian, &inl)
  1212  	out[12] |= (inl % (1 << 11)) << (23 - 11)
  1213  	out[13] = (inl >> 11)
  1214  	binary.Read(in, binary.LittleEndian, &inl)
  1215  	out[13] |= (inl % (1 << 2)) << (23 - 2)
  1216  	out[14] = (inl >> 2) % (1 << 23)
  1217  	out[15] = (inl >> 25)
  1218  	binary.Read(in, binary.LittleEndian, &inl)
  1219  	out[15] |= (inl % (1 << 16)) << (23 - 16)
  1220  	out[16] = (inl >> 16)
  1221  	binary.Read(in, binary.LittleEndian, &inl)
  1222  	out[16] |= (inl % (1 << 7)) << (23 - 7)
  1223  	out[17] = (inl >> 7) % (1 << 23)
  1224  	out[18] = (inl >> 30)
  1225  	binary.Read(in, binary.LittleEndian, &inl)
  1226  	out[18] |= (inl % (1 << 21)) << (23 - 21)
  1227  	out[19] = (inl >> 21)
  1228  	binary.Read(in, binary.LittleEndian, &inl)
  1229  	out[19] |= (inl % (1 << 12)) << (23 - 12)
  1230  	out[20] = (inl >> 12)
  1231  	binary.Read(in, binary.LittleEndian, &inl)
  1232  	out[20] |= (inl % (1 << 3)) << (23 - 3)
  1233  	out[21] = (inl >> 3) % (1 << 23)
  1234  	out[22] = (inl >> 26)
  1235  	binary.Read(in, binary.LittleEndian, &inl)
  1236  	out[22] |= (inl % (1 << 17)) << (23 - 17)
  1237  	out[23] = (inl >> 17)
  1238  	binary.Read(in, binary.LittleEndian, &inl)
  1239  	out[23] |= (inl % (1 << 8)) << (23 - 8)
  1240  	out[24] = (inl >> 8) % (1 << 23)
  1241  	out[25] = (inl >> 31)
  1242  	binary.Read(in, binary.LittleEndian, &inl)
  1243  	out[25] |= (inl % (1 << 22)) << (23 - 22)
  1244  	out[26] = (inl >> 22)
  1245  	binary.Read(in, binary.LittleEndian, &inl)
  1246  	out[26] |= (inl % (1 << 13)) << (23 - 13)
  1247  	out[27] = (inl >> 13)
  1248  	binary.Read(in, binary.LittleEndian, &inl)
  1249  	out[27] |= (inl % (1 << 4)) << (23 - 4)
  1250  	out[28] = (inl >> 4) % (1 << 23)
  1251  	out[29] = (inl >> 27)
  1252  	binary.Read(in, binary.LittleEndian, &inl)
  1253  	out[29] |= (inl % (1 << 18)) << (23 - 18)
  1254  	out[30] = (inl >> 18)
  1255  	binary.Read(in, binary.LittleEndian, &inl)
  1256  	out[30] |= (inl % (1 << 9)) << (23 - 9)
  1257  	out[31] = (inl >> 9)
  1258  }
  1259  
  1260  func unpack24_32(in io.Reader, out []uint32) {
  1261  	var inl uint32
  1262  	for i := 0; i < 8; i++ {
  1263  		base := i * 4
  1264  
  1265  		binary.Read(in, binary.LittleEndian, &inl)
  1266  		out[base] = (inl >> 0) % (1 << 24)
  1267  		out[base+1] = (inl >> 24)
  1268  		binary.Read(in, binary.LittleEndian, &inl)
  1269  		out[base+1] |= (inl % (1 << 16)) << (24 - 16)
  1270  		out[base+2] = (inl >> 16)
  1271  		binary.Read(in, binary.LittleEndian, &inl)
  1272  		out[base+2] |= (inl % (1 << 8)) << (24 - 8)
  1273  		out[base+3] = (inl >> 8)
  1274  	}
  1275  }
  1276  
  1277  func unpack25_32(in io.Reader, out []uint32) {
  1278  	var inl uint32
  1279  	binary.Read(in, binary.LittleEndian, &inl)
  1280  	out[0] = (inl >> 0) % (1 << 25)
  1281  	out[1] = (inl >> 25)
  1282  	binary.Read(in, binary.LittleEndian, &inl)
  1283  	out[1] |= (inl % (1 << 18)) << (25 - 18)
  1284  	out[2] = (inl >> 18)
  1285  	binary.Read(in, binary.LittleEndian, &inl)
  1286  	out[2] |= (inl % (1 << 11)) << (25 - 11)
  1287  	out[3] = (inl >> 11)
  1288  	binary.Read(in, binary.LittleEndian, &inl)
  1289  	out[3] |= (inl % (1 << 4)) << (25 - 4)
  1290  	out[4] = (inl >> 4) % (1 << 25)
  1291  	out[5] = (inl >> 29)
  1292  	binary.Read(in, binary.LittleEndian, &inl)
  1293  	out[5] |= (inl % (1 << 22)) << (25 - 22)
  1294  	out[6] = (inl >> 22)
  1295  	binary.Read(in, binary.LittleEndian, &inl)
  1296  	out[6] |= (inl % (1 << 15)) << (25 - 15)
  1297  	out[7] = (inl >> 15)
  1298  	binary.Read(in, binary.LittleEndian, &inl)
  1299  	out[7] |= (inl % (1 << 8)) << (25 - 8)
  1300  	out[8] = (inl >> 8)
  1301  	binary.Read(in, binary.LittleEndian, &inl)
  1302  	out[8] |= (inl % (1 << 1)) << (25 - 1)
  1303  	out[9] = (inl >> 1) % (1 << 25)
  1304  	out[10] = (inl >> 26)
  1305  	binary.Read(in, binary.LittleEndian, &inl)
  1306  	out[10] |= (inl % (1 << 19)) << (25 - 19)
  1307  	out[11] = (inl >> 19)
  1308  	binary.Read(in, binary.LittleEndian, &inl)
  1309  	out[11] |= (inl % (1 << 12)) << (25 - 12)
  1310  	out[12] = (inl >> 12)
  1311  	binary.Read(in, binary.LittleEndian, &inl)
  1312  	out[12] |= (inl % (1 << 5)) << (25 - 5)
  1313  	out[13] = (inl >> 5) % (1 << 25)
  1314  	out[14] = (inl >> 30)
  1315  	binary.Read(in, binary.LittleEndian, &inl)
  1316  	out[14] |= (inl % (1 << 23)) << (25 - 23)
  1317  	out[15] = (inl >> 23)
  1318  	binary.Read(in, binary.LittleEndian, &inl)
  1319  	out[15] |= (inl % (1 << 16)) << (25 - 16)
  1320  	out[16] = (inl >> 16)
  1321  	binary.Read(in, binary.LittleEndian, &inl)
  1322  	out[16] |= (inl % (1 << 9)) << (25 - 9)
  1323  	out[17] = (inl >> 9)
  1324  	binary.Read(in, binary.LittleEndian, &inl)
  1325  	out[17] |= (inl % (1 << 2)) << (25 - 2)
  1326  	out[18] = (inl >> 2) % (1 << 25)
  1327  	out[19] = (inl >> 27)
  1328  	binary.Read(in, binary.LittleEndian, &inl)
  1329  	out[19] |= (inl % (1 << 20)) << (25 - 20)
  1330  	out[20] = (inl >> 20)
  1331  	binary.Read(in, binary.LittleEndian, &inl)
  1332  	out[20] |= (inl % (1 << 13)) << (25 - 13)
  1333  	out[21] = (inl >> 13)
  1334  	binary.Read(in, binary.LittleEndian, &inl)
  1335  	out[21] |= (inl % (1 << 6)) << (25 - 6)
  1336  	out[22] = (inl >> 6) % (1 << 25)
  1337  	out[23] = (inl >> 31)
  1338  	binary.Read(in, binary.LittleEndian, &inl)
  1339  	out[23] |= (inl % (1 << 24)) << (25 - 24)
  1340  	out[24] = (inl >> 24)
  1341  	binary.Read(in, binary.LittleEndian, &inl)
  1342  	out[24] |= (inl % (1 << 17)) << (25 - 17)
  1343  	out[25] = (inl >> 17)
  1344  	binary.Read(in, binary.LittleEndian, &inl)
  1345  	out[25] |= (inl % (1 << 10)) << (25 - 10)
  1346  	out[26] = (inl >> 10)
  1347  	binary.Read(in, binary.LittleEndian, &inl)
  1348  	out[26] |= (inl % (1 << 3)) << (25 - 3)
  1349  	out[27] = (inl >> 3) % (1 << 25)
  1350  	out[28] = (inl >> 28)
  1351  	binary.Read(in, binary.LittleEndian, &inl)
  1352  	out[28] |= (inl % (1 << 21)) << (25 - 21)
  1353  	out[29] = (inl >> 21)
  1354  	binary.Read(in, binary.LittleEndian, &inl)
  1355  	out[29] |= (inl % (1 << 14)) << (25 - 14)
  1356  	out[30] = (inl >> 14)
  1357  	binary.Read(in, binary.LittleEndian, &inl)
  1358  	out[30] |= (inl % (1 << 7)) << (25 - 7)
  1359  	out[31] = (inl >> 7)
  1360  }
  1361  
  1362  func unpack26_32(in io.Reader, out []uint32) {
  1363  	var inl uint32
  1364  	binary.Read(in, binary.LittleEndian, &inl)
  1365  	out[0] = (inl >> 0) % (1 << 26)
  1366  	out[1] = (inl >> 26)
  1367  	binary.Read(in, binary.LittleEndian, &inl)
  1368  	out[1] |= (inl % (1 << 20)) << (26 - 20)
  1369  	out[2] = (inl >> 20)
  1370  	binary.Read(in, binary.LittleEndian, &inl)
  1371  	out[2] |= (inl % (1 << 14)) << (26 - 14)
  1372  	out[3] = (inl >> 14)
  1373  	binary.Read(in, binary.LittleEndian, &inl)
  1374  	out[3] |= (inl % (1 << 8)) << (26 - 8)
  1375  	out[4] = (inl >> 8)
  1376  	binary.Read(in, binary.LittleEndian, &inl)
  1377  	out[4] |= (inl % (1 << 2)) << (26 - 2)
  1378  	out[5] = (inl >> 2) % (1 << 26)
  1379  	out[6] = (inl >> 28)
  1380  	binary.Read(in, binary.LittleEndian, &inl)
  1381  	out[6] |= (inl % (1 << 22)) << (26 - 22)
  1382  	out[7] = (inl >> 22)
  1383  	binary.Read(in, binary.LittleEndian, &inl)
  1384  	out[7] |= (inl % (1 << 16)) << (26 - 16)
  1385  	out[8] = (inl >> 16)
  1386  	binary.Read(in, binary.LittleEndian, &inl)
  1387  	out[8] |= (inl % (1 << 10)) << (26 - 10)
  1388  	out[9] = (inl >> 10)
  1389  	binary.Read(in, binary.LittleEndian, &inl)
  1390  	out[9] |= (inl % (1 << 4)) << (26 - 4)
  1391  	out[10] = (inl >> 4) % (1 << 26)
  1392  	out[11] = (inl >> 30)
  1393  	binary.Read(in, binary.LittleEndian, &inl)
  1394  	out[11] |= (inl % (1 << 24)) << (26 - 24)
  1395  	out[12] = (inl >> 24)
  1396  	binary.Read(in, binary.LittleEndian, &inl)
  1397  	out[12] |= (inl % (1 << 18)) << (26 - 18)
  1398  	out[13] = (inl >> 18)
  1399  	binary.Read(in, binary.LittleEndian, &inl)
  1400  	out[13] |= (inl % (1 << 12)) << (26 - 12)
  1401  	out[14] = (inl >> 12)
  1402  	binary.Read(in, binary.LittleEndian, &inl)
  1403  	out[14] |= (inl % (1 << 6)) << (26 - 6)
  1404  	out[15] = (inl >> 6)
  1405  	binary.Read(in, binary.LittleEndian, &inl)
  1406  	out[16] = (inl >> 0) % (1 << 26)
  1407  	out[17] = (inl >> 26)
  1408  	binary.Read(in, binary.LittleEndian, &inl)
  1409  	out[17] |= (inl % (1 << 20)) << (26 - 20)
  1410  	out[18] = (inl >> 20)
  1411  	binary.Read(in, binary.LittleEndian, &inl)
  1412  	out[18] |= (inl % (1 << 14)) << (26 - 14)
  1413  	out[19] = (inl >> 14)
  1414  	binary.Read(in, binary.LittleEndian, &inl)
  1415  	out[19] |= (inl % (1 << 8)) << (26 - 8)
  1416  	out[20] = (inl >> 8)
  1417  	binary.Read(in, binary.LittleEndian, &inl)
  1418  	out[20] |= (inl % (1 << 2)) << (26 - 2)
  1419  	out[21] = (inl >> 2) % (1 << 26)
  1420  	out[22] = (inl >> 28)
  1421  	binary.Read(in, binary.LittleEndian, &inl)
  1422  	out[22] |= (inl % (1 << 22)) << (26 - 22)
  1423  	out[23] = (inl >> 22)
  1424  	binary.Read(in, binary.LittleEndian, &inl)
  1425  	out[23] |= (inl % (1 << 16)) << (26 - 16)
  1426  	out[24] = (inl >> 16)
  1427  	binary.Read(in, binary.LittleEndian, &inl)
  1428  	out[24] |= (inl % (1 << 10)) << (26 - 10)
  1429  	out[25] = (inl >> 10)
  1430  	binary.Read(in, binary.LittleEndian, &inl)
  1431  	out[25] |= (inl % (1 << 4)) << (26 - 4)
  1432  	out[26] = (inl >> 4) % (1 << 26)
  1433  	out[27] = (inl >> 30)
  1434  	binary.Read(in, binary.LittleEndian, &inl)
  1435  	out[27] |= (inl % (1 << 24)) << (26 - 24)
  1436  	out[28] = (inl >> 24)
  1437  	binary.Read(in, binary.LittleEndian, &inl)
  1438  	out[28] |= (inl % (1 << 18)) << (26 - 18)
  1439  	out[29] = (inl >> 18)
  1440  	binary.Read(in, binary.LittleEndian, &inl)
  1441  	out[29] |= (inl % (1 << 12)) << (26 - 12)
  1442  	out[30] = (inl >> 12)
  1443  	binary.Read(in, binary.LittleEndian, &inl)
  1444  	out[30] |= (inl % (1 << 6)) << (26 - 6)
  1445  	out[31] = (inl >> 6)
  1446  }
  1447  
  1448  func unpack27_32(in io.Reader, out []uint32) {
  1449  	var inl uint32
  1450  	binary.Read(in, binary.LittleEndian, &inl)
  1451  	out[0] = (inl >> 0) % (1 << 27)
  1452  	out[1] = (inl >> 27)
  1453  	binary.Read(in, binary.LittleEndian, &inl)
  1454  	out[1] |= (inl % (1 << 22)) << (27 - 22)
  1455  	out[2] = (inl >> 22)
  1456  	binary.Read(in, binary.LittleEndian, &inl)
  1457  	out[2] |= (inl % (1 << 17)) << (27 - 17)
  1458  	out[3] = (inl >> 17)
  1459  	binary.Read(in, binary.LittleEndian, &inl)
  1460  	out[3] |= (inl % (1 << 12)) << (27 - 12)
  1461  	out[4] = (inl >> 12)
  1462  	binary.Read(in, binary.LittleEndian, &inl)
  1463  	out[4] |= (inl % (1 << 7)) << (27 - 7)
  1464  	out[5] = (inl >> 7)
  1465  	binary.Read(in, binary.LittleEndian, &inl)
  1466  	out[5] |= (inl % (1 << 2)) << (27 - 2)
  1467  	out[6] = (inl >> 2) % (1 << 27)
  1468  	out[7] = (inl >> 29)
  1469  	binary.Read(in, binary.LittleEndian, &inl)
  1470  	out[7] |= (inl % (1 << 24)) << (27 - 24)
  1471  	out[8] = (inl >> 24)
  1472  	binary.Read(in, binary.LittleEndian, &inl)
  1473  	out[8] |= (inl % (1 << 19)) << (27 - 19)
  1474  	out[9] = (inl >> 19)
  1475  	binary.Read(in, binary.LittleEndian, &inl)
  1476  	out[9] |= (inl % (1 << 14)) << (27 - 14)
  1477  	out[10] = (inl >> 14)
  1478  	binary.Read(in, binary.LittleEndian, &inl)
  1479  	out[10] |= (inl % (1 << 9)) << (27 - 9)
  1480  	out[11] = (inl >> 9)
  1481  	binary.Read(in, binary.LittleEndian, &inl)
  1482  	out[11] |= (inl % (1 << 4)) << (27 - 4)
  1483  	out[12] = (inl >> 4) % (1 << 27)
  1484  	out[13] = (inl >> 31)
  1485  	binary.Read(in, binary.LittleEndian, &inl)
  1486  	out[13] |= (inl % (1 << 26)) << (27 - 26)
  1487  	out[14] = (inl >> 26)
  1488  	binary.Read(in, binary.LittleEndian, &inl)
  1489  	out[14] |= (inl % (1 << 21)) << (27 - 21)
  1490  	out[15] = (inl >> 21)
  1491  	binary.Read(in, binary.LittleEndian, &inl)
  1492  	out[15] |= (inl % (1 << 16)) << (27 - 16)
  1493  	out[16] = (inl >> 16)
  1494  	binary.Read(in, binary.LittleEndian, &inl)
  1495  	out[16] |= (inl % (1 << 11)) << (27 - 11)
  1496  	out[17] = (inl >> 11)
  1497  	binary.Read(in, binary.LittleEndian, &inl)
  1498  	out[17] |= (inl % (1 << 6)) << (27 - 6)
  1499  	out[18] = (inl >> 6)
  1500  	binary.Read(in, binary.LittleEndian, &inl)
  1501  	out[18] |= (inl % (1 << 1)) << (27 - 1)
  1502  	out[19] = (inl >> 1) % (1 << 27)
  1503  	out[20] = (inl >> 28)
  1504  	binary.Read(in, binary.LittleEndian, &inl)
  1505  	out[20] |= (inl % (1 << 23)) << (27 - 23)
  1506  	out[21] = (inl >> 23)
  1507  	binary.Read(in, binary.LittleEndian, &inl)
  1508  	out[21] |= (inl % (1 << 18)) << (27 - 18)
  1509  	out[22] = (inl >> 18)
  1510  	binary.Read(in, binary.LittleEndian, &inl)
  1511  	out[22] |= (inl % (1 << 13)) << (27 - 13)
  1512  	out[23] = (inl >> 13)
  1513  	binary.Read(in, binary.LittleEndian, &inl)
  1514  	out[23] |= (inl % (1 << 8)) << (27 - 8)
  1515  	out[24] = (inl >> 8)
  1516  	binary.Read(in, binary.LittleEndian, &inl)
  1517  	out[24] |= (inl % (1 << 3)) << (27 - 3)
  1518  	out[25] = (inl >> 3) % (1 << 27)
  1519  	out[26] = (inl >> 30)
  1520  	binary.Read(in, binary.LittleEndian, &inl)
  1521  	out[26] |= (inl % (1 << 25)) << (27 - 25)
  1522  	out[27] = (inl >> 25)
  1523  	binary.Read(in, binary.LittleEndian, &inl)
  1524  	out[27] |= (inl % (1 << 20)) << (27 - 20)
  1525  	out[28] = (inl >> 20)
  1526  	binary.Read(in, binary.LittleEndian, &inl)
  1527  	out[28] |= (inl % (1 << 15)) << (27 - 15)
  1528  	out[29] = (inl >> 15)
  1529  	binary.Read(in, binary.LittleEndian, &inl)
  1530  	out[29] |= (inl % (1 << 10)) << (27 - 10)
  1531  	out[30] = (inl >> 10)
  1532  	binary.Read(in, binary.LittleEndian, &inl)
  1533  	out[30] |= (inl % (1 << 5)) << (27 - 5)
  1534  	out[31] = (inl >> 5)
  1535  }
  1536  
  1537  func unpack28_32(in io.Reader, out []uint32) {
  1538  	var inl uint32
  1539  	for i := 0; i < 4; i++ {
  1540  		base := i * 8
  1541  
  1542  		binary.Read(in, binary.LittleEndian, &inl)
  1543  		out[base] = (inl >> 0) % (1 << 28)
  1544  		out[base+1] = (inl >> 28)
  1545  		binary.Read(in, binary.LittleEndian, &inl)
  1546  		out[base+1] |= (inl % (1 << 24)) << (28 - 24)
  1547  		out[base+2] = (inl >> 24)
  1548  		binary.Read(in, binary.LittleEndian, &inl)
  1549  		out[base+2] |= (inl % (1 << 20)) << (28 - 20)
  1550  		out[base+3] = (inl >> 20)
  1551  		binary.Read(in, binary.LittleEndian, &inl)
  1552  		out[base+3] |= (inl % (1 << 16)) << (28 - 16)
  1553  		out[base+4] = (inl >> 16)
  1554  		binary.Read(in, binary.LittleEndian, &inl)
  1555  		out[base+4] |= (inl % (1 << 12)) << (28 - 12)
  1556  		out[base+5] = (inl >> 12)
  1557  		binary.Read(in, binary.LittleEndian, &inl)
  1558  		out[base+5] |= (inl % (1 << 8)) << (28 - 8)
  1559  		out[base+6] = (inl >> 8)
  1560  		binary.Read(in, binary.LittleEndian, &inl)
  1561  		out[base+6] |= (inl % (1 << 4)) << (28 - 4)
  1562  		out[base+7] = (inl >> 4)
  1563  	}
  1564  }
  1565  
  1566  func unpack29_32(in io.Reader, out []uint32) {
  1567  	var inl uint32
  1568  	binary.Read(in, binary.LittleEndian, &inl)
  1569  	out[0] = (inl >> 0) % (1 << 29)
  1570  	out[1] = (inl >> 29)
  1571  	binary.Read(in, binary.LittleEndian, &inl)
  1572  	out[1] |= (inl % (1 << 26)) << (29 - 26)
  1573  	out[2] = (inl >> 26)
  1574  	binary.Read(in, binary.LittleEndian, &inl)
  1575  	out[2] |= (inl % (1 << 23)) << (29 - 23)
  1576  	out[3] = (inl >> 23)
  1577  	binary.Read(in, binary.LittleEndian, &inl)
  1578  	out[3] |= (inl % (1 << 20)) << (29 - 20)
  1579  	out[4] = (inl >> 20)
  1580  	binary.Read(in, binary.LittleEndian, &inl)
  1581  	out[4] |= (inl % (1 << 17)) << (29 - 17)
  1582  	out[5] = (inl >> 17)
  1583  	binary.Read(in, binary.LittleEndian, &inl)
  1584  	out[5] |= (inl % (1 << 14)) << (29 - 14)
  1585  	out[6] = (inl >> 14)
  1586  	binary.Read(in, binary.LittleEndian, &inl)
  1587  	out[6] |= (inl % (1 << 11)) << (29 - 11)
  1588  	out[7] = (inl >> 11)
  1589  	binary.Read(in, binary.LittleEndian, &inl)
  1590  	out[7] |= (inl % (1 << 8)) << (29 - 8)
  1591  	out[8] = (inl >> 8)
  1592  	binary.Read(in, binary.LittleEndian, &inl)
  1593  	out[8] |= (inl % (1 << 5)) << (29 - 5)
  1594  	out[9] = (inl >> 5)
  1595  	binary.Read(in, binary.LittleEndian, &inl)
  1596  	out[9] |= (inl % (1 << 2)) << (29 - 2)
  1597  	out[10] = (inl >> 2) % (1 << 29)
  1598  	out[11] = (inl >> 31)
  1599  	binary.Read(in, binary.LittleEndian, &inl)
  1600  	out[11] |= (inl % (1 << 28)) << (29 - 28)
  1601  	out[12] = (inl >> 28)
  1602  	binary.Read(in, binary.LittleEndian, &inl)
  1603  	out[12] |= (inl % (1 << 25)) << (29 - 25)
  1604  	out[13] = (inl >> 25)
  1605  	binary.Read(in, binary.LittleEndian, &inl)
  1606  	out[13] |= (inl % (1 << 22)) << (29 - 22)
  1607  	out[14] = (inl >> 22)
  1608  	binary.Read(in, binary.LittleEndian, &inl)
  1609  	out[14] |= (inl % (1 << 19)) << (29 - 19)
  1610  	out[15] = (inl >> 19)
  1611  	binary.Read(in, binary.LittleEndian, &inl)
  1612  	out[15] |= (inl % (1 << 16)) << (29 - 16)
  1613  	out[16] = (inl >> 16)
  1614  	binary.Read(in, binary.LittleEndian, &inl)
  1615  	out[16] |= (inl % (1 << 13)) << (29 - 13)
  1616  	out[17] = (inl >> 13)
  1617  	binary.Read(in, binary.LittleEndian, &inl)
  1618  	out[17] |= (inl % (1 << 10)) << (29 - 10)
  1619  	out[18] = (inl >> 10)
  1620  	binary.Read(in, binary.LittleEndian, &inl)
  1621  	out[18] |= (inl % (1 << 7)) << (29 - 7)
  1622  	out[19] = (inl >> 7)
  1623  	binary.Read(in, binary.LittleEndian, &inl)
  1624  	out[19] |= (inl % (1 << 4)) << (29 - 4)
  1625  	out[20] = (inl >> 4)
  1626  	binary.Read(in, binary.LittleEndian, &inl)
  1627  	out[20] |= (inl % (1 << 1)) << (29 - 1)
  1628  	out[21] = (inl >> 1) % (1 << 29)
  1629  	out[22] = (inl >> 30)
  1630  	binary.Read(in, binary.LittleEndian, &inl)
  1631  	out[22] |= (inl % (1 << 27)) << (29 - 27)
  1632  	out[23] = (inl >> 27)
  1633  	binary.Read(in, binary.LittleEndian, &inl)
  1634  	out[23] |= (inl % (1 << 24)) << (29 - 24)
  1635  	out[24] = (inl >> 24)
  1636  	binary.Read(in, binary.LittleEndian, &inl)
  1637  	out[24] |= (inl % (1 << 21)) << (29 - 21)
  1638  	out[25] = (inl >> 21)
  1639  	binary.Read(in, binary.LittleEndian, &inl)
  1640  	out[25] |= (inl % (1 << 18)) << (29 - 18)
  1641  	out[26] = (inl >> 18)
  1642  	binary.Read(in, binary.LittleEndian, &inl)
  1643  	out[26] |= (inl % (1 << 15)) << (29 - 15)
  1644  	out[27] = (inl >> 15)
  1645  	binary.Read(in, binary.LittleEndian, &inl)
  1646  	out[27] |= (inl % (1 << 12)) << (29 - 12)
  1647  	out[28] = (inl >> 12)
  1648  	binary.Read(in, binary.LittleEndian, &inl)
  1649  	out[28] |= (inl % (1 << 9)) << (29 - 9)
  1650  	out[29] = (inl >> 9)
  1651  	binary.Read(in, binary.LittleEndian, &inl)
  1652  	out[29] |= (inl % (1 << 6)) << (29 - 6)
  1653  	out[30] = (inl >> 6)
  1654  	binary.Read(in, binary.LittleEndian, &inl)
  1655  	out[30] |= (inl % (1 << 3)) << (29 - 3)
  1656  	out[31] = (inl >> 3)
  1657  }
  1658  
  1659  func unpack30_32(in io.Reader, out []uint32) {
  1660  	var inl uint32
  1661  	binary.Read(in, binary.LittleEndian, &inl)
  1662  	out[0] = (inl >> 0) % (1 << 30)
  1663  	out[1] = (inl >> 30)
  1664  	binary.Read(in, binary.LittleEndian, &inl)
  1665  	out[1] |= (inl % (1 << 28)) << (30 - 28)
  1666  	out[2] = (inl >> 28)
  1667  	binary.Read(in, binary.LittleEndian, &inl)
  1668  	out[2] |= (inl % (1 << 26)) << (30 - 26)
  1669  	out[3] = (inl >> 26)
  1670  	binary.Read(in, binary.LittleEndian, &inl)
  1671  	out[3] |= (inl % (1 << 24)) << (30 - 24)
  1672  	out[4] = (inl >> 24)
  1673  	binary.Read(in, binary.LittleEndian, &inl)
  1674  	out[4] |= (inl % (1 << 22)) << (30 - 22)
  1675  	out[5] = (inl >> 22)
  1676  	binary.Read(in, binary.LittleEndian, &inl)
  1677  	out[5] |= (inl % (1 << 20)) << (30 - 20)
  1678  	out[6] = (inl >> 20)
  1679  	binary.Read(in, binary.LittleEndian, &inl)
  1680  	out[6] |= (inl % (1 << 18)) << (30 - 18)
  1681  	out[7] = (inl >> 18)
  1682  	binary.Read(in, binary.LittleEndian, &inl)
  1683  	out[7] |= (inl % (1 << 16)) << (30 - 16)
  1684  	out[8] = (inl >> 16)
  1685  	binary.Read(in, binary.LittleEndian, &inl)
  1686  	out[8] |= (inl % (1 << 14)) << (30 - 14)
  1687  	out[9] = (inl >> 14)
  1688  	binary.Read(in, binary.LittleEndian, &inl)
  1689  	out[9] |= (inl % (1 << 12)) << (30 - 12)
  1690  	out[10] = (inl >> 12)
  1691  	binary.Read(in, binary.LittleEndian, &inl)
  1692  	out[10] |= (inl % (1 << 10)) << (30 - 10)
  1693  	out[11] = (inl >> 10)
  1694  	binary.Read(in, binary.LittleEndian, &inl)
  1695  	out[11] |= (inl % (1 << 8)) << (30 - 8)
  1696  	out[12] = (inl >> 8)
  1697  	binary.Read(in, binary.LittleEndian, &inl)
  1698  	out[12] |= (inl % (1 << 6)) << (30 - 6)
  1699  	out[13] = (inl >> 6)
  1700  	binary.Read(in, binary.LittleEndian, &inl)
  1701  	out[13] |= (inl % (1 << 4)) << (30 - 4)
  1702  	out[14] = (inl >> 4)
  1703  	binary.Read(in, binary.LittleEndian, &inl)
  1704  	out[14] |= (inl % (1 << 2)) << (30 - 2)
  1705  	out[15] = (inl >> 2)
  1706  	binary.Read(in, binary.LittleEndian, &inl)
  1707  	out[16] = (inl >> 0) % (1 << 30)
  1708  	out[17] = (inl >> 30)
  1709  	binary.Read(in, binary.LittleEndian, &inl)
  1710  	out[17] |= (inl % (1 << 28)) << (30 - 28)
  1711  	out[18] = (inl >> 28)
  1712  	binary.Read(in, binary.LittleEndian, &inl)
  1713  	out[18] |= (inl % (1 << 26)) << (30 - 26)
  1714  	out[19] = (inl >> 26)
  1715  	binary.Read(in, binary.LittleEndian, &inl)
  1716  	out[19] |= (inl % (1 << 24)) << (30 - 24)
  1717  	out[20] = (inl >> 24)
  1718  	binary.Read(in, binary.LittleEndian, &inl)
  1719  	out[20] |= (inl % (1 << 22)) << (30 - 22)
  1720  	out[21] = (inl >> 22)
  1721  	binary.Read(in, binary.LittleEndian, &inl)
  1722  	out[21] |= (inl % (1 << 20)) << (30 - 20)
  1723  	out[22] = (inl >> 20)
  1724  	binary.Read(in, binary.LittleEndian, &inl)
  1725  	out[22] |= (inl % (1 << 18)) << (30 - 18)
  1726  	out[23] = (inl >> 18)
  1727  	binary.Read(in, binary.LittleEndian, &inl)
  1728  	out[23] |= (inl % (1 << 16)) << (30 - 16)
  1729  	out[24] = (inl >> 16)
  1730  	binary.Read(in, binary.LittleEndian, &inl)
  1731  	out[24] |= (inl % (1 << 14)) << (30 - 14)
  1732  	out[25] = (inl >> 14)
  1733  	binary.Read(in, binary.LittleEndian, &inl)
  1734  	out[25] |= (inl % (1 << 12)) << (30 - 12)
  1735  	out[26] = (inl >> 12)
  1736  	binary.Read(in, binary.LittleEndian, &inl)
  1737  	out[26] |= (inl % (1 << 10)) << (30 - 10)
  1738  	out[27] = (inl >> 10)
  1739  	binary.Read(in, binary.LittleEndian, &inl)
  1740  	out[27] |= (inl % (1 << 8)) << (30 - 8)
  1741  	out[28] = (inl >> 8)
  1742  	binary.Read(in, binary.LittleEndian, &inl)
  1743  	out[28] |= (inl % (1 << 6)) << (30 - 6)
  1744  	out[29] = (inl >> 6)
  1745  	binary.Read(in, binary.LittleEndian, &inl)
  1746  	out[29] |= (inl % (1 << 4)) << (30 - 4)
  1747  	out[30] = (inl >> 4)
  1748  	binary.Read(in, binary.LittleEndian, &inl)
  1749  	out[30] |= (inl % (1 << 2)) << (30 - 2)
  1750  	out[31] = (inl >> 2)
  1751  }
  1752  
  1753  func unpack31_32(in io.Reader, out []uint32) {
  1754  	var inl uint32
  1755  	binary.Read(in, binary.LittleEndian, &inl)
  1756  	out[0] = (inl >> 0) % (1 << 31)
  1757  	out[1] = (inl >> 31)
  1758  	binary.Read(in, binary.LittleEndian, &inl)
  1759  	out[1] |= (inl % (1 << 30)) << (31 - 30)
  1760  	out[2] = (inl >> 30)
  1761  	binary.Read(in, binary.LittleEndian, &inl)
  1762  	out[2] |= (inl % (1 << 29)) << (31 - 29)
  1763  	out[3] = (inl >> 29)
  1764  	binary.Read(in, binary.LittleEndian, &inl)
  1765  	out[3] |= (inl % (1 << 28)) << (31 - 28)
  1766  	out[4] = (inl >> 28)
  1767  	binary.Read(in, binary.LittleEndian, &inl)
  1768  	out[4] |= (inl % (1 << 27)) << (31 - 27)
  1769  	out[5] = (inl >> 27)
  1770  	binary.Read(in, binary.LittleEndian, &inl)
  1771  	out[5] |= (inl % (1 << 26)) << (31 - 26)
  1772  	out[6] = (inl >> 26)
  1773  	binary.Read(in, binary.LittleEndian, &inl)
  1774  	out[6] |= (inl % (1 << 25)) << (31 - 25)
  1775  	out[7] = (inl >> 25)
  1776  	binary.Read(in, binary.LittleEndian, &inl)
  1777  	out[7] |= (inl % (1 << 24)) << (31 - 24)
  1778  	out[8] = (inl >> 24)
  1779  	binary.Read(in, binary.LittleEndian, &inl)
  1780  	out[8] |= (inl % (1 << 23)) << (31 - 23)
  1781  	out[9] = (inl >> 23)
  1782  	binary.Read(in, binary.LittleEndian, &inl)
  1783  	out[9] |= (inl % (1 << 22)) << (31 - 22)
  1784  	out[10] = (inl >> 22)
  1785  	binary.Read(in, binary.LittleEndian, &inl)
  1786  	out[10] |= (inl % (1 << 21)) << (31 - 21)
  1787  	out[11] = (inl >> 21)
  1788  	binary.Read(in, binary.LittleEndian, &inl)
  1789  	out[11] |= (inl % (1 << 20)) << (31 - 20)
  1790  	out[12] = (inl >> 20)
  1791  	binary.Read(in, binary.LittleEndian, &inl)
  1792  	out[12] |= (inl % (1 << 19)) << (31 - 19)
  1793  	out[13] = (inl >> 19)
  1794  	binary.Read(in, binary.LittleEndian, &inl)
  1795  	out[13] |= (inl % (1 << 18)) << (31 - 18)
  1796  	out[14] = (inl >> 18)
  1797  	binary.Read(in, binary.LittleEndian, &inl)
  1798  	out[14] |= (inl % (1 << 17)) << (31 - 17)
  1799  	out[15] = (inl >> 17)
  1800  	binary.Read(in, binary.LittleEndian, &inl)
  1801  	out[15] |= (inl % (1 << 16)) << (31 - 16)
  1802  	out[16] = (inl >> 16)
  1803  	binary.Read(in, binary.LittleEndian, &inl)
  1804  	out[16] |= (inl % (1 << 15)) << (31 - 15)
  1805  	out[17] = (inl >> 15)
  1806  	binary.Read(in, binary.LittleEndian, &inl)
  1807  	out[17] |= (inl % (1 << 14)) << (31 - 14)
  1808  	out[18] = (inl >> 14)
  1809  	binary.Read(in, binary.LittleEndian, &inl)
  1810  	out[18] |= (inl % (1 << 13)) << (31 - 13)
  1811  	out[19] = (inl >> 13)
  1812  	binary.Read(in, binary.LittleEndian, &inl)
  1813  	out[19] |= (inl % (1 << 12)) << (31 - 12)
  1814  	out[20] = (inl >> 12)
  1815  	binary.Read(in, binary.LittleEndian, &inl)
  1816  	out[20] |= (inl % (1 << 11)) << (31 - 11)
  1817  	out[21] = (inl >> 11)
  1818  	binary.Read(in, binary.LittleEndian, &inl)
  1819  	out[21] |= (inl % (1 << 10)) << (31 - 10)
  1820  	out[22] = (inl >> 10)
  1821  	binary.Read(in, binary.LittleEndian, &inl)
  1822  	out[22] |= (inl % (1 << 9)) << (31 - 9)
  1823  	out[23] = (inl >> 9)
  1824  	binary.Read(in, binary.LittleEndian, &inl)
  1825  	out[23] |= (inl % (1 << 8)) << (31 - 8)
  1826  	out[24] = (inl >> 8)
  1827  	binary.Read(in, binary.LittleEndian, &inl)
  1828  	out[24] |= (inl % (1 << 7)) << (31 - 7)
  1829  	out[25] = (inl >> 7)
  1830  	binary.Read(in, binary.LittleEndian, &inl)
  1831  	out[25] |= (inl % (1 << 6)) << (31 - 6)
  1832  	out[26] = (inl >> 6)
  1833  	binary.Read(in, binary.LittleEndian, &inl)
  1834  	out[26] |= (inl % (1 << 5)) << (31 - 5)
  1835  	out[27] = (inl >> 5)
  1836  	binary.Read(in, binary.LittleEndian, &inl)
  1837  	out[27] |= (inl % (1 << 4)) << (31 - 4)
  1838  	out[28] = (inl >> 4)
  1839  	binary.Read(in, binary.LittleEndian, &inl)
  1840  	out[28] |= (inl % (1 << 3)) << (31 - 3)
  1841  	out[29] = (inl >> 3)
  1842  	binary.Read(in, binary.LittleEndian, &inl)
  1843  	out[29] |= (inl % (1 << 2)) << (31 - 2)
  1844  	out[30] = (inl >> 2)
  1845  	binary.Read(in, binary.LittleEndian, &inl)
  1846  	out[30] |= (inl % (1 << 1)) << (31 - 1)
  1847  	out[31] = (inl >> 1)
  1848  }
  1849  
  1850  func unpack32_32(in io.Reader, out []uint32) {
  1851  	for idx := range out[:32] {
  1852  		binary.Read(in, binary.LittleEndian, &out[idx])
  1853  	}
  1854  }
  1855  
  1856  func nullunpack32(_ io.Reader, out []uint32) {
  1857  	out[0] = 0
  1858  	for i := 1; i < 32; i *= 2 {
  1859  		copy(out[i:], out[:i])
  1860  	}
  1861  }
  1862  
  1863  func unpack32Default(in io.Reader, out []uint32, nbits int) int {
  1864  	batch := len(out) / 32 * 32
  1865  	nloops := batch / 32
  1866  
  1867  	var f unpackFunc
  1868  	switch nbits {
  1869  	case 0:
  1870  		f = nullunpack32
  1871  	case 1:
  1872  		f = unpack1_32
  1873  	case 2:
  1874  		f = unpack2_32
  1875  	case 3:
  1876  		f = unpack3_32
  1877  	case 4:
  1878  		f = unpack4_32
  1879  	case 5:
  1880  		f = unpack5_32
  1881  	case 6:
  1882  		f = unpack6_32
  1883  	case 7:
  1884  		f = unpack7_32
  1885  	case 8:
  1886  		f = unpack8_32
  1887  	case 9:
  1888  		f = unpack9_32
  1889  	case 10:
  1890  		f = unpack10_32
  1891  	case 11:
  1892  		f = unpack11_32
  1893  	case 12:
  1894  		f = unpack12_32
  1895  	case 13:
  1896  		f = unpack13_32
  1897  	case 14:
  1898  		f = unpack14_32
  1899  	case 15:
  1900  		f = unpack15_32
  1901  	case 16:
  1902  		f = unpack16_32
  1903  	case 17:
  1904  		f = unpack17_32
  1905  	case 18:
  1906  		f = unpack18_32
  1907  	case 19:
  1908  		f = unpack19_32
  1909  	case 20:
  1910  		f = unpack20_32
  1911  	case 21:
  1912  		f = unpack21_32
  1913  	case 22:
  1914  		f = unpack22_32
  1915  	case 23:
  1916  		f = unpack23_32
  1917  	case 24:
  1918  		f = unpack24_32
  1919  	case 25:
  1920  		f = unpack25_32
  1921  	case 26:
  1922  		f = unpack26_32
  1923  	case 27:
  1924  		f = unpack27_32
  1925  	case 28:
  1926  		f = unpack28_32
  1927  	case 29:
  1928  		f = unpack29_32
  1929  	case 30:
  1930  		f = unpack30_32
  1931  	case 31:
  1932  		f = unpack31_32
  1933  	case 32:
  1934  		f = unpack32_32
  1935  	default:
  1936  		return 0
  1937  	}
  1938  
  1939  	for i := 0; i < nloops; i++ {
  1940  		f(in, out[i*32:])
  1941  	}
  1942  	return batch
  1943  }