Archived

This topic is now archived and is closed to further replies.

how do i determine the size of a file based on..

This topic is 5844 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

im reading in from .pak files, and in the directory header contains each file''s position in the pak and its length.. what i want to know is, does this length represent the length of each file in bytes? if so, why can''t i just do something like: pakfile[x].filelen / 1000 = kilobytes? this doesn''t work, so does anyone know how i get the size of the file (in kilobytes) based on the "file length" marked in a .pak''s header?

Share this post


Link to post
Share on other sites
So, how are getting the *real* filesize? ie. how do you know it''s wrong? Are you looking at what explorer reports? Have you verified that the file outside of the .pak has the same size as the file reported in the header in the .pak?

If you have a size in bytes, and you divide that by 1024, then you will have the size in kilobytes. If it''s wrong, then what''s right?



-Brannon

Share this post


Link to post
Share on other sites