code: private static byte encodeBlockSize(int blockSize) {
      if(DEBUG_LEV > 0 )
        System.err.println("FrameHeader::encodeBlockSize : Begin");
      byte value = 0;
      int i;
      for(i = 0; i < definedBlockSizes.length; i++) {
        if(blockSize == definedBlockSizes[i]) {
          value = (byte)i;
          break;
        }
      }
      if(i >= definedBlockSizes.length) {
        if(blockSize <= 255)
          value = 0x6;
        else
          value = 0x7;
      }
  
      if(DEBUG_LEV > 0 )
        System.err.println("FrameHeader::encodeBlockSize : End");
  
      return value;
    }
docs: Given a block size, select the proper bit settings to use according to
  the FLAC stream.
  @param blockSize
  @return