EldoS | Feel safer!

Software components for data protection, secure storage and transfer

SolFs compressed filesystem

Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.
#2015
Posted: 01/19/2007 07:02:20
by Miguel De Buf (Priority Standard support level)
Joined: 01/04/2007
Posts: 32

Hi there,
I am trying to create a solfs drive with compression turned on. I tried setting .Compression and .CompressionLevel, but when I then copy a file to the mounted drive using the windows explorer, the image file does not seem to be compressed at all.

The Code :

m_objStorage = New SolFSDrv.SolFSStorage()
With m_objStorage
.PageSize = 4096
.UseTransactions = False
.UseAccessTime = False
.PathSeparator = "\"
.Logo = ""
.FileName = "d:\drive-" & m_strDriveLetter & ".sol"

.Open(SolFSDrv.StorageOpenMode.somOpenAlways)
.Compression = SolFSDrv.SolFSCompression.crZLib
.CompressionLevel = 9

.AddMountingPoint("i:")
End With

Did I do something wrong ?

Thanks,
Miguel
#2016
Posted: 01/19/2007 07:38:45
by Alexander Plas (EldoS Corp.)

Parameters .Compression and .CompressionLevel will be used for files that will have been created by SolFS functions. If you like to use compression for all files in storage you have to call

.SetFileCompression("\", SolFSDrv.SolFSCompression.crZLib, 6, 16, "")

This will set compression for root directory and all new subfiles and subdirectories
#2017
Posted: 01/19/2007 08:42:51
by Miguel De Buf (Priority Standard support level)
Joined: 01/04/2007
Posts: 32

I tried this, but the image file of the drive does not compress. Allthough, if I open the image file using an editor, I see a lot of \ entries in the file. Before I tried the compression, the image file contained the real file contents. Note that I am using an evaluation version.
If I activate compression like above, what should the effect be on the image file ? It seems like the files inside are compressed, but that the image file does not reflect this...

My code to mount a solfs drive with compression :

'-- Create a SolFS Storage File.
m_objStorage = New SolFSDrv.SolFSStorage()
With m_objStorage

.PageSize = 4096
.UseTransactions = False
.UseAccessTime = False
.PathSeparator = "\"
.Logo = ""
.FileName = "d:\drive-" & m_strDriveLetter & ".sol"

'-- Open storage if it exists, create storage file is it doesn't exist yet.
.Open(SolFSDrv.StorageOpenMode.somOpenAlways)

'-- Turn on compression of the image file.
.SetFileCompression("\", SolFSDrv.SolFSCompression.crZLib, 9, 1, "")
End With

'-- Mount it as drive i:
m_objStorage.AddMountingPoint(m_strDriveLetter & ":")
#2018
Posted: 01/19/2007 09:25:12
by Alexander Plas (EldoS Corp.)

In function SetCompression parameter pagesPerCluster shuld be more that 1. SolFS compress data of pagesPerCluster pages and try to place it on less page count. Default PagesPerCluster value for SolFS is 16.
#2021
Posted: 01/20/2007 07:13:23
by Miguel De Buf (Priority Standard support level)
Joined: 01/04/2007
Posts: 32

I use .SetFileCompression("\", SolFSDrv.SolFSCompression.crZLib, 9, 16, "") now, but I note no difference. I copy 5 identical files to the drive. They all are 1.026Kb and contain only the letter 'a'. The image file after copying the 5 files is every time 5.288Kb big. I tried it with and without compression. What else could be wrong ?
#2026
Posted: 01/23/2007 07:45:17
by Eugene Mayevski (EldoS Corp.)

In fact, the issue with compressed files is not a bug but specifics of a driver. The storage is resized to accomodate all files being written. Then, if due to compression the files took less space than estimated, the storage must be compacted. This should be done when all files on the storage are closed (i.e. not immediately during writing). There are certain issues with tracking of this event. The developers are working on it.


Sincerely yours
Eugene Mayevski
#2088
Posted: 01/26/2007 14:10:04
by Eugene Mayevski (EldoS Corp.)

FYI: new build is on the site.


Sincerely yours
Eugene Mayevski
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 4951 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!