maths + toots = ???
What is the highest amount of data you can store in a toot?
(We'll assume that we're not attaching a file, because that makes things more complex.)
Let's start with a basic idea: we're going to fill each character of a toot with either a 0 or a 1.
Then we have 500 binary digits, or 500 bits of information.
But we can do better: let's use base-10.
With base-10, we can fill up each char with one of 0-9, which means we have ~1660.96 bits of information.
But we can do better
maths + toots = ???
mastodon appears to count characters as "a unicode character", so 'a' is a character, and so is '임' (rather than twitter, which counts Korean and Chinese characters as being multiple characters, for some reason).
So we can fill up each of our characters with any existing unicode code point.since there are 1,112,064 code points in UTF-8, we can have 10283.4218946 bits of information in one toot.
BUT!
we can do better...
(thanks to @popefucker@cybre.space for sending the maths)
maths + toots = ???
One small thing we can do: press the "cw" button, and put some of our content in the cw field. This adds 1 extra bit of information (whether the cw field is used or not), bringing us to ~10284.4 bits.
We can also change the privacy level of the toot. We have 5 levels of information there, so we add 2.32193 more bits.
BUT!
We can do even better!
maths + toots = ???
When you include a link in mastodon, it's assumed to be exactly 25 characters. So instead of composing a toot of 500 characters, we're going to compose a toot with 20 URLs.
Now, we are going to have to do some experimentation before we can continue – URLs don't have a max size , but certain pieces of software (e.g. Internet Explorer) can't handle URLs longer than 2000 characters.
But that doesn't mean we can't put them in our toot – we have to find out if masto has a limit.
maths + toots = ???
If it's the former, then lets assume the cap is 64,000 characters.
Then, we can store 20 * 64,000 = 1,280,000 chars in a toot.
which is ~2.5708554736384 × 10^7 bits of information (around 26 million bits)
Which sounds like a lot (and it is!), but it's only 3.2 megabytes.
maths + toots, conclusion
so we've come to the conclusion that we can probably store around 3MB of data in a toot.
This doesn't include images or video, which can increase our total mb count quite significantly.
But potentially we can store as much as we want, just by using URLs to store our data.
(a small correction: masto considers URLs to be 23 chars, which means we can actually fit one more URL in, giving us 2.6993982473203197×10^7 bits.)