code: public static int lengthForDtype(DataType type) {
          switch (type) {
              case DOUBLE:
                  return 8;
              case FLOAT:
                  return 4;
              case INT:
                  return 4;
              case HALF:
                  return 2;
              case LONG:
                  return 8;
              case COMPRESSED:
              default:
                  throw new IllegalArgumentException("Illegal opType for length");
  
          }
  
  
      }
docs: Returns the length for the given data opType
  @param type
  @return