public void showCompress(Formatter f) throws IOException { NetcdfFile ncfile = iosp.getNetcdfFile(); Size totalSize = new Size(0,0); for (Variable v : ncfile.getVariables()) { H5header.Vinfo vinfo = (H5header.Vinfo) v.getSPobject(); showCompress(v, vinfo, totalSize, f); } f.format("%n"); f.format(" total bytes = %d%n", totalSize.nominal); f.format(" total storage = %d%n", totalSize.storage); f.format(" compression = %f%n", totalSize.getRatio()); f.format(" nchunks = %d%n", totalSize.count); File raf = new File(ncfile.getLocation()); f.format(" file size = %d%n", raf.length()); float overhead = totalSize.storage == 0 ? 0 : ((float) raf.length()/totalSize.storage); f.format(" overhead = %f%n", overhead); }
public void showCompress(Formatter f) throws IOException { NetcdfFile ncfile = iosp.getNetcdfFile(); Size totalSize = new Size(0,0); for (Variable v : ncfile.getVariables()) { H5header.Vinfo vinfo = (H5header.Vinfo) v.getSPobject(); showCompress(v, vinfo, totalSize, f); } f.format("%n"); f.format(" total bytes = %d%n", totalSize.nominal); f.format(" total storage = %d%n", totalSize.storage); f.format(" compression = %f%n", totalSize.getRatio()); f.format(" nchunks = %d%n", totalSize.count); File raf = new File(ncfile.getLocation()); f.format(" file size = %d%n", raf.length()); f.format(" overhead = %f%n", ((float) raf.length()/totalSize.storage)); }
public void showCompress(Formatter f) throws IOException { NetcdfFile ncfile = iosp.getNetcdfFile(); Size totalSize = new Size(0,0); for (Variable v : ncfile.getVariables()) { H5header.Vinfo vinfo = (H5header.Vinfo) v.getSPobject(); showCompress(v, vinfo, totalSize, f); } f.format("%n"); f.format(" total bytes = %d%n", totalSize.nominal); f.format(" total storage = %d%n", totalSize.storage); f.format(" compression = %f%n", totalSize.getRatio()); f.format(" nchunks = %d%n", totalSize.count); File raf = new File(ncfile.getLocation()); f.format(" file size = %d%n", raf.length()); float overhead = totalSize.storage == 0 ? 0 : ((float) raf.length()/totalSize.storage); f.format(" overhead = %f%n", overhead); }