Suppose, there is a requirement while compressing file using java zip compression that output file size shouldn't be more than specific limit and if it is more than specific limit, it should generate multiple files of size equal or less than size limit.
For e.g.,
Input requirements:
input folder/ file.txt (949MB)
Max limit of compressed file: 100MB
Output:
Output folder / file0.txt.zip (100MB)
Output folder / file1.txt.zip (100MB)
.....
.....
Output folder / file9.txt.zip (49MB)
Please share your thoughts on this as I didn't find method which can help me in getting compress file size at runtime.