@Switch Blayde
How can there be a size algorithm? The size of the file in bytes is what it is.
Not really.
The file is in UTF-8 and contains html codes. So a story/chapter with lots of short phrases dialogue will bloat quite a bit.
For example:
"What?" should be counted as 7 characters, but if you take just the size reported by the file system, it would be:
< p>'''What?'''< /p> (or 13 characters, so almost double).
I created an a function that strips html tags and then counts non-ascii characters properly as 1 character each instead of 3 for each utf-8 high character.
After I read this thread, I looked and in the admin side there were three instances of story size update that weren't using the new algorithm.
Bug fixed. From now on the size should be consistent after updates. Although, if a story has been updated with the old code due to the bugs, then it might still be inconsistent if it gets updated now. But the inconsistency will be a single occurrence.