jonataslaw / get_packer

A high-performance serialization library for Dart, designed to efficiently pack and unpack data structures. It provides a fast and compact alternative to JSON encoding/decoding and MessagePack
MIT License
7 stars 0 forks source link

How to use with API and dio/http? also merge with getX #1

Open fisforfaheem opened 1 week ago

fisforfaheem commented 1 week ago

need more details

jonataslaw commented 1 week ago

This package will be used to support the new features of GetStorage.

GetStorage currently writes a json file, which when the data is large, ends up overloading the disk with writes.

The idea is to use binary, which is smaller (and faster than the native jsonDecode), and do partial writes. So if I add a {key: foo, value: bar}, it only writes that information to the file instead of rewriting the entire file. Since Hive is dead, this can help both GetStorage and Hive users.

In addition, I will release a Mutex library (for synchronizing writes, and the new version of GetStorage)

As for dio, this would have to be done at the library level (GetConnect perhaps?), as what this does is transform dart objects into a serializable form (binary in this case), to be written to disk or transmitted more efficiently.

fisforfaheem commented 1 week ago

Great To hear! Would love to see the updates, Kindly Focus on GetX updates as well, most of the people was a stable GetX as of Now, as companies are forcing to move to BLOC.

On Tue, Oct 15, 2024 at 8:33 PM Jonny Borges @.***> wrote:

This package will be used to support the new features of GetStorage.

GetStorage currently writes a json file, which when the data is large, ends up overloading the disk with writes.

The idea is to use binary, which is smaller (and faster than the native jsonDecode), and do partial writes. So if I add a {key: foo, value: bar}, it only writes that information to the file instead of rewriting the entire file. Since Hive is dead, this can help both GetStorage and Hive users.

In addition, I will release a Mutex library (for synchronizing writes, and the new version of GetStorage)

As for dio, this would have to be done at the library level (GetConnect perhaps?), as what this does is transform dart objects into a serializable form (binary in this case), to be written to disk or transmitted more efficiently.

— Reply to this email directly, view it on GitHub https://github.com/jonataslaw/get_packer/issues/1#issuecomment-2414340594, or unsubscribe https://github.com/notifications/unsubscribe-auth/AIRXJSDTYGUQXA2HGBYDX6DZ3UYVLAVCNFSM6AAAAABP7E7N4WVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIMJUGM2DANJZGQ . You are receiving this because you authored the thread.Message ID: @.***>