If this is some arbitrary combination of text, code, etc. I doubt if there is a way to reduce it to a specific size. Compression utilities such as ZIP, BZIP, etc. are called "information-preserving"---i.e. they ensure that nothing is lost. To guarantee that nothing is lost, you cannot also dictate the file size.
By contrast, you can manipulate images to arbitrary file sizes---but with varying degrees of quality loss.
If you can give some more context for you question, there may be some other ideas.....
|