Java Tutorial - File Compression

preview_player
Показать описание
Video tutorial on how to compress a file using Java

Рекомендации по теме
Комментарии
Автор

Does that works with heavy large files ( 5GB or 10 GB ) ? or it uses memory to zip files and then puts them in the hard disk ?

eboubaker
Автор

how do i return back to the original file like any function just share me

ethiokemsha
Автор

When i compress file through this method in android studio it corrupts the compressed file.

aenaqadeer
Автор

It is not working for images. I tested with png files. the compressed file size is almost same as the input image file

siddharthmagadum
Автор

Sir please make video on video file compressor in android studio

sachinrakibe
Автор

Please upload the video to compress/reduce pdf file size using java code, , , to make it as very smaller in size

rahmathhumayun
Автор

How to compress using LZW ? Is it the same algorithm?

evieeve
Автор

Is it possible to compress video using this program?

vishnu
Автор

public class compressActivity extends AppCompatActivity {

String filePath="";
Uri path;

@Override
protected void onCreate(Bundle savedInstanceState) {


filePath =
File file = new
path = Uri.fromFile(file);
Log.d("File : ", filePath);
Toast.makeText(getApplicationContext(), "File : "+ path, Toast.LENGTH_SHORT).show();

// File source = new File(filePath);
// File destination = new

// try {
// Compression(source, destination);
// Toast.makeText(getApplicationContext(), "Done", Toast.LENGTH_SHORT).show();
// } catch (IOException e) {
// e.printStackTrace();
// }

}

// public static void Compression(File source, File destination) throws IOException
// {
// byte[] buffer = new byte[4096];
// FileInputStream fileInputStream = new FileInputStream(source);
// FileOutputStream fileOutputStream = new
// GZIPOutputStream gzipOutputStream = new
// int read;
// while((read= fileInputStream.read(buffer)) != -1)
// {
// gzipOutputStream.write(buffer, 0, read);
//
// }
// gzipOutputStream.finish();
// gzipOutputStream.close();
// fileOutputStream.close();
// fileInputStream.close();
//
// }
}

aenaqadeer
join shbcf.ru