EldoS | Feel safer!

Software components for data protection, secure storage and transfer

Size of the storage file is not reset to its original size.

Also by EldoS: RawDisk
Access locked and protected files in Windows, read and write disks and partitions and more.
Posted: 06/04/2007 08:50:45
by Datta Kandalkar (Basic support level)
Joined: 05/16/2007
Posts: 25

Dear Sir,

My first question is What should be the size of the empty storage file?. When there is nothing in the storage file, its size is shown as 86 KB.

case 1.
Now consider the following scenarios. Initially there is nothing in the storage file and its size is 86 kb.

case 2.
When we programmatically insert one file of size 25.4 kb, the storage files size becomes 136 Kb, Again after deleting this file of 25.4 kb, the storage size should be 86 kb, but it becomes 112 kb.

case 3.
Again when we programmatically insert 2 files of size 25.4 kb each, the storage file size becomes 205 kb.

As you can see that after deleting the files from the storage, the size of the storage in not reset to previous size. What might be the problem, will you please clarify.

Thanking you.

Yours faithfully,

Datta Kandalkar
Posted: 06/04/2007 09:19:38
by Alexander Plas (Team)


You should use Compact() function to make storage file smallest as possible.

Can you tell me PageSize of your storage?
Posted: 06/04/2007 09:32:03
by Datta Kandalkar (Basic support level)
Joined: 05/16/2007
Posts: 25

Using Compact will compact my storage, but my issue is somewhat different, after deleting the files from the storage, its size is not reset to the original size.

For you information the page size which i have set is "512".

Posted: 06/05/2007 02:45:02
by Alexander Plas (Team)

Storage file can decrease size only as a result of Compact operation. SolFS perform Compact automatically when storage file contain more that AutoCompact percents of free space. If you like to maintain storage file smallest, you should call Compact manually.

Normally storage with page size 512 bytes take after creation 1536 bytes (3 * 512). After one file creation and deletion storage file take 2048 bytes (4 * 512).

Can you send me or place here your storage file before and after every operation.
Posted: 06/05/2007 05:47:47
by Datta Kandalkar (Basic support level)
Joined: 05/16/2007
Posts: 25

I cant upload the storage file on this forum. i am getting error message as "Incorrect file type or maximum size of the file exceeded (.st)!"

Is there any other alternative?


Posted: 06/05/2007 07:16:38
by Alexander Plas (Team)

You can upload .zip files. Please archive your storage files.
Posted: 06/05/2007 08:21:47
by Datta Kandalkar (Basic support level)
Joined: 05/16/2007
Posts: 25

Attached here with is the empty storage file and its size is 86 kb. Please clarify why its size is 86 Kb

[ Download ]
Posted: 06/06/2007 02:30:52
by Alexander Plas (Team)


Your storage file is corrupted. To utilize free space in your storage file you have to perform CheckAndRepair operation and then Compact operation.
I’m not able to understand how your storage becomes corrupted. If it possible place here source code of your project (archived), and I will try to investigate reasons of your problems with SolFS.
Posted: 06/06/2007 03:04:36
by Datta Kandalkar (Basic support level)
Joined: 05/16/2007
Posts: 25

Dear Plas,

I am able to store and remove files from this storage, then how you say that it is corrupted? How should i repair this corrupted storage file.

Will you please send me a short flow of the api calls i should use to repair the corrupted storage. becouse when i call the CheckAndRepair function, i get the exception as "Object reference not set to an instance of the object".


Datta K
Posted: 06/06/2007 03:58:25
by Alexander Plas (Team)

Here is working code for CheckAndRepair

static void Main(string[] args)
  SolFSStorage storage = new SolFSStorage();

  storage.FileName = @"D:\\Work\\SolFS\\Test\\BVlocalbck.st";

Please download latest build of SolFS from our site. There is fixed few errors. Also you can use our SolFS Explorer for working with storage files.
Also by EldoS: CallbackDisk
Create virtual disks backed by memory or custom location, expose disk images as disks and more.



Topic viewed 13075 times

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


Back to top

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

Got it!