Frequently Asked qusetion no-62 not Justified

Q62 What is the difference between EOF and AllocationSize? Why is the AllocationSize the same for a file AFTER it is compressed?

First of all thanks a lot for gr8 documentation guys!!!

Have one doubt about compressed file Allocationsize on NTFS windows 7 machine.
Simple Test:
1.Create a file more then 4kb.(created 11 kb file)
2.the Allocation size = 12,288
3.the eof or file size is = 10,996

Now compress the file on NTFS.
Allocation size is = 8192(It may be anything depends on the data but definatly will be less then file size).
Eof or file size is = 10,996
After checking through ProcMon the sizes are same as above.

So now i have one doubt either the question 62 answaer is incorrect or am i missing something???

./Mani

Allocation has to do with the physical blocks the file takes up on disk.
Notice how they are multiples of 512? EOF is just a value to denote where
the last byte is.

On Thu, Sep 11, 2014 at 11:20 AM, wrote:

> Q62 What is the difference between EOF and AllocationSize? Why is the
> AllocationSize the same for a file AFTER it is compressed?
>
> First of all thanks a lot for gr8 documentation guys!!!
>
> Have one doubt about compressed file Allocationsize on NTFS windows 7
> machine.
> Simple Test:
> 1.Create a file more then 4kb.(created 11 kb file)
> 2.the Allocation size = 12,288
> 3.the eof or file size is = 10,996
>
> Now compress the file on NTFS.
> Allocation size is = 8192(It may be anything depends on the data but
> definatly will be less then file size).
> Eof or file size is = 10,996
> After checking through ProcMon the sizes are same as above.
>
> So now i have one doubt either the question 62 answaer is incorrect or am
> i missing something???
>
> ./Mani
>
>
> —
> NTFSD is sponsored by OSR
>
> OSR is hiring!! Info at http://www.osr.com/careers
>
> For our schedule of debugging and file system seminars visit:
> http://www.osr.com/seminars
>
> To unsubscribe, visit the List Server section of OSR Online at
> http://www.osronline.com/page.cfm?name=ListServer
>

Clarification: also multiples of 1024, 2048, 4096 which are also valid
block sizes.

On Thu, Sep 11, 2014 at 11:23 AM, Paul wrote:

> Allocation has to do with the physical blocks the file takes up on disk.
> Notice how they are multiples of 512? EOF is just a value to denote where
> the last byte is.
>
> On Thu, Sep 11, 2014 at 11:20 AM, wrote:
>
>> Q62 What is the difference between EOF and AllocationSize? Why is the
>> AllocationSize the same for a file AFTER it is compressed?
>>
>> First of all thanks a lot for gr8 documentation guys!!!
>>
>> Have one doubt about compressed file Allocationsize on NTFS windows 7
>> machine.
>> Simple Test:
>> 1.Create a file more then 4kb.(created 11 kb file)
>> 2.the Allocation size = 12,288
>> 3.the eof or file size is = 10,996
>>
>> Now compress the file on NTFS.
>> Allocation size is = 8192(It may be anything depends on the data but
>> definatly will be less then file size).
>> Eof or file size is = 10,996
>> After checking through ProcMon the sizes are same as above.
>>
>> So now i have one doubt either the question 62 answaer is incorrect or am
>> i missing something???
>>
>> ./Mani
>>
>>
>> —
>> NTFSD is sponsored by OSR
>>
>> OSR is hiring!! Info at http://www.osr.com/careers
>>
>> For our schedule of debugging and file system seminars visit:
>> http://www.osr.com/seminars
>>
>> To unsubscribe, visit the List Server section of OSR Online at
>> http://www.osronline.com/page.cfm?name=ListServer
>>
>
>

It’s possible it’s wrong, or it’s also possible the OS has changed over time (so it’s wrong now, but wasn’t in the past).

At one point I was burned by this because the EOF was beyond AllocationSize and this caused the section to be sized smaller than the mapped view. This would show up in the cache manager when it crashed crossing 256KB boundaries.

Tony
OSR

Many thanks to tony for justification.finally got an answer.

@Tony:
I am maintaining my own shadow file object(for a enc/dec based minifilter) and doing all the size related manipulation properly without compression on files and folders.now i need to have a support for Compressed volume(s),folder(s),File(s) so what kind of precaution needs to be taken on Allocation size,Eof calculation.is there any specific thing need to do.

One more thing which allocation size i need to update in my advance header after compression or the time once the file got created without compression.

Is there any specific size limit to files on widows to do compression???

Thanks
mani

> now i need to have a support for Compressed volume(s),folder(s),File(s)

so what kind of precaution needs to be
taken on Allocation size,Eof calculation.is there any specific thing need
to do.

Good luck with this. It will take a lot of work. Report back if you
succeed, but I suspect that you are in uncharted waters. (See
https://www.osronline.com/showthread.cfm?link=258802)