GZip


Greetings,

In an attempt to reduce the size of the files required for my application, I would like to gzip them and then unzip and read one file at a time.

Can this be done "on the fly" and then read into Plain.open() and/or VisADForm.open()?

Something like


  public static FieldImpl readGZipFile(String Filename)
  {
    FieldImpl r_field;
    visad.data.visad.VisADForm input = new visad.data.visad.VisADForm(true);

    try
    {
      r_field = (FieldImpl) input.readData(
                                             new visad.data.visad.BinaryReader(
                                             new GZIPInputStream(
                                             new FileInputStream(Filename) ) )
                                           );
    }
    catch (Exception ioe)
    { System.err.println("TerrainBlockage (readGZipFile): " + ioe); }

    return r_field;
  }


I've tried this and since readData() is "package private" it will not compile (blatantly showing my Java ignorance ;-)


Many thanks!!

-kevin.




--
+------------------------------------------------------------+
Kevin L. Manross        [KD5MYD] <><          (405)-366-0557
CIMMS Research Associate               kevin.manross@xxxxxxxx
[NSSL-WRDD/SWATN]           http://www.cimms.ou.edu/~kmanross

"My opinions are my own and not representative of CIMMS, NSSL,
 NOAA or any affiliates"
+------------------------------------------------------------+


  • 2004 messages navigation, sorted by:
    1. Thread
    2. Subject
    3. Author
    4. Date
    5. ↑ Table Of Contents
  • Search the visad archives: