public static void main ( String [ ] args ) throws Exception { String input = args [ 0 ] ; File outputFile = new File ( input . replace ( ".zip" , "" ) + ".serialized.xz" ) ; // Get the base name FileOutputStream fos = new FileOutputStream ( outputFile ) ; LZMA2Options options = new LZMA2Options ( 9 ) ; XZOutputStream xzo = new XZOutputStream ( fos , options ) ; ObjectOutputStream oos = new ObjectOutputStream ( xzo ) ; BundleSerializer ml = new BundleSerializer ( ) ; ml . loadDocuments ( input ) ; oos . writeObject ( ml . toStore ) ; oos . flush ( ) ; oos . close ( ) ; }
Converts a zip file into a serialized compress resource .