EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Cloud Storage Compression in SBB 9.0

Also by EldoS: CallbackProcess
A component to control process creation and termination in Windows and .NET applications.
#17289
Posted: 08/15/2011 21:39:29
by Eric Lenington (Standard support level)
Joined: 12/06/2010
Posts: 37

I see in the release notes that in-line compression is now supported in SBB 9.0 for cloud storage, but in reading through the documentation, I don't see any mention of it. Can you point me to the information? Also, a Delphi example of how to configure compression would be very helpful.
#17293
Posted: 08/16/2011 01:11:53
by Eugene Mayevski (EldoS Corp.)

Unfortunately documentation lags behind the code ...

The samples however include support for compression. Here's the magic line in C# sample:

Code
SBDataStorage.Unit.DataStorageEncodingHandlersFactory().RegisterHandler(TElZlibDataStorageEncodingHandler.MetaClass.Instance);


It's called right after the license key is set.


Sincerely yours
Eugene Mayevski
#17297
Posted: 08/16/2011 05:00:05
by Ken Ivanov (EldoS Corp.)

A few words to add: the above line of code only plugs compression support in "in general". To force compression of particular uploaded object, you should switch it on explicitly with the following line of code:

using SBDataStorageEncodings;

...

m_Handler.EncodingHandler = new TElZlibDataStorageEncodingHandler();

where m_Handler is the security handler you pass to the WriteObject() method for the uploaded object.
#17307
Posted: 08/16/2011 12:02:02
by Eric Lenington (Standard support level)
Joined: 12/06/2010
Posts: 37

Thanks for the quick response. A couple of follow-up questions:
1) Any Delphi examples?
2) Any estimate as to when docs will be updated?
3) I assume that compression happens before encryption?
4) I assume that once a particular object is written compressed, there is nothing special to do read it (i.e. SBB automatically detects that the object is compressed and decompresses it)?
5) Please expand on the strategy for selective compression. Your brief example leads me to believe that I almost need to instantiate a compressing and a non-compressing AWS connection.
#17308
Posted: 08/16/2011 12:29:06
by Ken Ivanov (EldoS Corp.)

Quote
1) Any Delphi examples?

Unfortunately, no out-of-the-box examples are available. However, you can make the existing examples support compression by

- adding the following line to the initialization section of the main form of your application (or any other piece of code that is executed before the storage is accessed):
DataStorageEncodingHandlersFactory.RegisterHandler(TElZlibDataStorageEncodingHandler);

- assigning the EncodingHandler property of the data storage security handler with TElZlibDataStorageEncodingHandler instance when writing object that are to be compressed:
Handler.EncodingHandler := TElZlibDataStorageEncodingHandler.Create(nil);

That's everything you need to do. No other changes are needed.

Quote
2) Any estimate as to when docs will be updated?

We are doing our best at the moment to get the docs to the actual state, however, I can't provide the exact estimation at the moment. This particular compression topic is likely to be available within a month.

Quote
3) I assume that compression happens before encryption?

Yes.

Quote
4) I assume that once a particular object is written compressed, there is nothing special to do read it (i.e. SBB automatically detects that the object is compressed and decompresses it)?

Yes, exactly.

Quote
5) Please expand on the strategy for selective compression. Your brief example leads me to believe that I almost need to instantiate a compressing and a non-compressing AWS connection.

Compression is done on per-object basis; each object can be compressed or not compressed independently on all other objects. EncodingHandler property of the security handler controls whether to compress a particular object written to a storage. Leave this property empty to have the object written uncompressed. Assign it with TElZlibDataStorageEncodingHandler instance to make the storage component compress the object before writing.
Also by EldoS: Rethync
The cross-platform framework that simplifies synchronizing data between mobile and desktop applications and servers and cloud storages

Reply

Statistics

Topic viewed 712 times

Number of guests: 1, registered members: 0, in total hidden: 0




|

Back to top

As of July 15, 2016 EldoS Corporation will operate as a division of /n software inc. For more information, please read the announcement.

Got it!