Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Allow serializing/desterilizing LavalinkTrack directly to byte array #166

Open
SKProCH opened this issue Aug 6, 2024 · 2 comments · May be fixed by #189
Open

Allow serializing/desterilizing LavalinkTrack directly to byte array #166

SKProCH opened this issue Aug 6, 2024 · 2 comments · May be fixed by #189
Labels
enhancement New feature or request

Comments

@SKProCH
Copy link
Collaborator

SKProCH commented Aug 6, 2024

Is your feature request related to a problem? Please describe.
I'm want to archive a high compression of data when storing lavalink tracks, and storing it in string creates unnecessary overhead (for UTF16 and BASE64 representation of binary data),

Describe the solution you'd like
It would be nice if i can just directly serialize LavalinkTrack to byte array or span.

Describe alternatives you've considered
Probably hooking up into existing methods via refrection, but this is isn't a great way.

@NycroV
Copy link
Collaborator

NycroV commented Sep 23, 2024

While I originally was going to simply add a collection of methods that replicate the behavior of the currently-in-place ToString() methods, I was not happy with this implementation. There was lots of boilerplate logic and generally messy code.

I believe the correct approach is a slight restructure to the current serialization implementation (while still maintaining the efficiency, speed, modularity, and formatting of the current implementations) that uses bytes as a default, which can then be extended to various other encoding formats.

I'll try to find time to work on this in the coming days. See branch feature/nycrov/serialization-rewrite

@NycroV NycroV added the enhancement New feature or request label Oct 8, 2024
@NycroV
Copy link
Collaborator

NycroV commented Oct 8, 2024

Re-created the branch for this and started from scratch as I wasn't happy with previous implementation.
Actual work has now begun on the attached development branch.

@NycroV NycroV linked a pull request Oct 10, 2024 that will close this issue
@NycroV NycroV linked a pull request Oct 10, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants