Thanks, I’ll try your Base85 code also.
But I’d like to confirm: the 4,000,000 chars is the limit for 1 PLAYER or the sum of ALL PLAYERS?
I hope it’s a limit for each player, so I have not to worry if I’ll have 1 or 10,000 players, since there is no space limit for the SUM of all players, just 4,000,000 chars for each individual player, right?
I’m using DataStore2.
The limit is per DataStore key, which you get an unlimited number of. If you wanted to, you could store unlimited data (don’t, though). How keys and data within those keys is organized is left entirely up to the developer.
I’m not sure how DataStore2 organizes data. It may be focused on the most common use-case where keys are assigned per player. You’d have to ask @Kampfkarren for more detail.
This should only apply per player, not as a global cap for all players.
I was thinking of creating a compression system just for numbers (0 ... 9
) plus 6 any other characters. like .,+-[]
, totaling 16) that would be derived from a numerical array in JSON, where it would be possible to put everything in just 4 bits.
In this way, it would be possible to have 2 numbers stored in a single byte, ie, 50% compression.
This would be excellent, especially when storing many numbers, CFrames, etc.
But now I see that this is impossible because JSON does not accept all bytes / characters ranging from 0 to 255.
As you said, Base64 is used to ensure that any source byte will result in JSON-readable chars, however, a simple test here (Binary to base64: Convert between bytes and base64 - cryptii) shows that 4 bytes with value 255 (11111111 11111111 11111111 11111111
) will result in 8 JSON bytes (/////w==
) .
Thus, an efficient compression system is difficult due to these JSON limitations.
I don’t know if I posted on this already, searches return nothing, BUT.
THIS
IS
HUGE.
I constantly had to live under the stress of having to attempt to compress a dictionary of Persona save data (which can go way past 256k chars if you plan to 100% the game), so now I can live WORRY-FREE and then some.
This. Is. Huge.
And I repeat. THIS. IS. HUGE.
Hurray for DataStores and worry-free dev’ing!
Good update, however…
What about PostAsync and GetAsync on HttpService 1024kb limit increase?
OMG YES! This is a great update, now I will be able to store all I want without caring that much about data store limitation.
Incredibly grateful for this update. Not sure what game needs a whole 4 megabytes, but I’m not going to sulk over a DataStore increase.
Chef’s kiss
Is it me? If I try to SetAsync a 4MB (in studio, not tried in game) string it throws
502: API Services rejected request with error. HTTP 403 (Forbidden)
Meanwhile, I can access other GetAsync or SetAsync functions in my game, but not if i try to set so much data…
Is it related?
This topic was automatically closed 120 days after the last reply. New replies are no longer allowed.