java - compress base64 encoded string data into decode format -
Hello, I am decoding the base 64 string data and saving it in database like the URL format with the data stamp So that I need to include decoded data. And my compression like if the incoming data is less than 100kb then there is no need to compress the data to reduce the data by 50%.
Try {string file} ITMRepp = propsfpcconfiggate.property ("file section referencepath"); String imageURLReferncePath = propsFPCConfig.getProperty ("imageURLReferncePath"); File f = new File (Failitimarifpath + "" "" productive "+" / "+ donor ID); string strException =" original file "+ FkgetName (); if (! F.exists ()) {if (! F.mkdirs ()) {System.out.println ( "towards creation failed"); return null;}} else {boolean isdirCreationStatus = f.mkdirs ();} string strDateTobeAppended = new SimpleDateFormat ( "YyyyMMdhhmmss") format (new Date ()); string filename = strImageName + strDateTobeAppended; SavedFile = new file (f.getAbsolutePath () + "/" + fileName); StrException = strxception + "saved file" + savedFile.getName (); base64 decoder = New base 64 (); byte [] decoded beats = d Coder. Sikod (Stripmbesbes 64); if ((Dikodedbit! = NULL) & amp; amp; amp; (Dikodedbaits. Lanh! = 0)) {System.out.println ( "distorted bytes length:" + Dikodedbate. Lamps) ; Fos = new FileOutputStream (saved Gyafail); System.out.println (new string (Dikodedbits) + "\ n"); Int x = 0; {Fos.write (Dikodedbaits, 0, Dikodedbaits. lamps);} Fos. Flush ();} if (fos! = Null) {fos.close (); System.out.println ("file output stream" + savedFile.getName ()); Return saveFile.getName (); } And {return tap; }} Hold (exception e) {e.printStackTrace (); } Finally {try {if (fos! = Null} {fos.close (); } Else {savedFile = null; }} Hold (IOException e) {e.printStackTrace (); }} Returns savedFile.getName (); }
Your main problem is probably not to compress it in Java, you just have to Can use some kind. On iOS it can be a bit more complex, because I'm not sure what kind of zombie devices you have in iOS.
Comments
Post a Comment