code: int decodevs(float[] a, int index, Buffer b, int step, int addmul) {
          int entry = decode(b);
          if (entry == -1) {
              return (-1);
          }
          switch (addmul) {
              case -1:
                  for (int i = 0, o = 0; i < dim; i++, o += step) {
                      a[index + o] = valuelist[entry * dim + i];
                  }
                  break;
              case 0:
                  for (int i = 0, o = 0; i < dim; i++, o += step) {
                      a[index + o] += valuelist[entry * dim + i];
                  }
                  break;
              case 1:
                  for (int i = 0, o = 0; i < dim; i++, o += step) {
                      a[index + o] *= valuelist[entry * dim + i];
                  }
                  break;
              default:
              //System.err.println("CodeBook.decodeves: addmul="+addmul); 
          }
          return (entry);
      }
docs: returns the entry number or -1 on eof