Difference between revisions of "Talk:COMP 3000 Lab 4 2012"

From Soma-notes
Jump to navigation Jump to search
(Created page with " Question aAbout padding from Part B - question 2: Does padding only occur at the end of the file? For example, if our file A is 256 bytes, the padding in file B will make i…")
 
(I'm answering someone's question.)
 
Line 1: Line 1:




Line 6: Line 5:
   Does padding only occur at the end of the file? For example, if our file A is 256 bytes, the padding in file B will make it 512 bytes?
   Does padding only occur at the end of the file? For example, if our file A is 256 bytes, the padding in file B will make it 512 bytes?
   Also, does a space character count as padding, or should we use null characters? (or are they the same)
   Also, does a space character count as padding, or should we use null characters? (or are they the same)
It specifically says padded with nulls though.  Null is 0 in Ascii.  Space is 32 in Ascii.  Really, even though it doesn't explicitly say the padding is at the end, it would be absolutely useless to bad elsewhere for most uses.
My understanding about the size was sizeof(B) = sizeof(A) + blocksize - sizeof(A)%blocksize.

Latest revision as of 20:11, 18 October 2012


Question aAbout padding from Part B - question 2:

 Does padding only occur at the end of the file? For example, if our file A is 256 bytes, the padding in file B will make it 512 bytes?
 Also, does a space character count as padding, or should we use null characters? (or are they the same)

It specifically says padded with nulls though. Null is 0 in Ascii. Space is 32 in Ascii. Really, even though it doesn't explicitly say the padding is at the end, it would be absolutely useless to bad elsewhere for most uses.

My understanding about the size was sizeof(B) = sizeof(A) + blocksize - sizeof(A)%blocksize.