static long checkPreambleSize(Memory mem){
  final long cap=mem.getCapacity();
  if (cap < 8) {
    throwNotBigEnough(cap,8);
  }
  final long pre0=mem.getLong(0);
  final int preLongs=(int)(pre0 & 0X3FL);
  final int required=Math.max(preLongs << 3,8);
  if (cap < required) {
    throwNotBigEnough(cap,required);
  }
  return pre0;
}

static long checkPreambleSize ( Memory mem ) { final long cap = mem . getCapacity ( ) ; if ( cap < 8 ) { throwNotBigEnough ( cap , 8 ) ; } final long pre0 = mem . getLong ( 0 ) ; final int preLongs = ( int ) ( pre0 & 0X3FL ) ; final int required = Math . max ( preLongs << 3 , 8 ) ; if ( cap < required ) { throwNotBigEnough ( cap , required ) ; } return pre0 ; }
checks memory for capacity to hold the preamble and returns the first 8 bytes .
