Hello, I am right now considering options for safely handling player data.
My game has a save slot system for players to save their projects, and these save slots can contain up to thousands of items. Without compression and proper data management, memory can run out fast. This means that I am trying to find a module that provides its benefits, but also does not encode my buffers into Base64 strings.
I can not find any sources explicitly stating whether or not ProfileStore directly supports AND saves buffers unencoded. Does anybody have any insight? Are there any strong alternatives that explicitly allow buffers?
If it isn’t supported, you can always do buffer.tostring(), and then buffer.fromstring() afterwards.
For my game, I have drawings compressed using Zstd encoded in Base64 before using tostring to save it in a datastore. I’m pretty sure datastores can save buffers just fine though.
Roblox datastores accept buffers in their API which leads me to believe that they can store the raw bytes. I am aware of the datastores manager, and it does not show any data previews to my knowledge. Additionally, if it were to show previews, it would of course present them in a human-readable format.
Thank you, I appreciate your response, but I am still trying to find the answer to my question regarding if ProfileStore base64 encodes my requests. This does not have to do with roblox API, it has to do with ProfileStore’s management. I am aware that they are completely open source and I can look at their code, but I am trying to find any official information.
Well, weird, okay. I appreciate your response. I’ve been a little far away from the platform for a while, so there are some standards that might come across as obvious that I am not accustomed to yet. I do hold it to my heart, though, to have patience for others in my situation.
Do you know if the key limit applies to buffers in their base64 form?
ProfileStore doesn’t seem to tamper with profile tables at all. You can read the source code linked in its topic and see for yourself what it does to data. I only see it referencing the table, asserting its type, and eventually passing it to the actual calls.
The only thing I could see being a problem is if your profile template has a buffer, it won’t actually clone it for new profiles. This post in that same topic talks about insufficient cloning. The type for profile data (exported for some reason) includes buffers:
export type JSONAcceptable = { JSONAcceptable } | { [string]: JSONAcceptable } | number | string | boolean | buffer
export type Profile<T> = {
Data: T & JSONAcceptable,