Win a copy of Design for the Mind this week in the Design forum!
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Compress Data using Java

 
Ketul Parikh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi,

There is an existing system in my company, where we are having 40 blob fields in a table.
Now we have decided to implement RSA, and we are now storing encrypted values.

When inserting Database gives error that it can only store 8000 bytes per row..

Of course now since encryption implementation is necessary and table design, though poor, cannot be changed..

I was thinking of Data Compression before inserting Data into the DB so that it can be stored within 8000 bytes.

Just for knowledge, we are using SQL Server 2000

Can Someone Help??
 
Ireneusz Kordal
Ranch Hand
Posts: 423
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Look at java.util.Zip package: http://java.sun.com/j2se/1.4.2/docs/api/java/util/zip/package-summary.html
it has compression utilities.
Here is a tutorial from Sun ... ops ... now from Oracle
http://java.sun.com/developer/technicalArticles/Programming/compression/
 
Ulf Dittmer
Rancher
Posts: 42967
73
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Be sure to perform the compression before the encryption, since encrypted files have a high entropy that makes them much less amenable to compression.
 
Ketul Parikh
Greenhorn
Posts: 14
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Thankx to All..
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic