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 = ???
after some experimenting: I managed to create a toot with a URL longer than 5000 characters.
I'm not sure what the limit is, so I stopped there.
We have 2 possibilities: we have some large number of characters available per URL, or we have an infinite number of characters per URL.
If it's the latter, we can store arbitrary amounts of information in a toot.
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.)
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.