You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
If an object can be represented in multiple possible output formats, serializers SHOULD use the format which represents the data in the smallest number of bytes.
I'm quite sure that the issue is mainly related to the spec itself that does not correctly exploits some strings representation well known and largely used (I'm going to submit a proposal for a few new types which can be highly compressed).
Even though the spec does not define the behavior in regard of predefined types in cases when applications want to override the default representation and are able to compress the data more than the standard serializer does, I suspect that each implementation should let the client to offer a different serializer for any of the predefined and handled type.
For example a client which knows its strings adhere to a well defined pattern can exploit the fact and the implementation should choose between the two different approaches using "the format which represents the data in the smallest number of bytes".
This implementation neither lets user defined functions to be used instead of the default ones nor lets the clients to propose a different approach.
It prefers the default one and that's all. A different approach could be appreciated.
The text was updated successfully, but these errors were encountered:
All true, but I am a little low on bandwidth to tackle this feature.
However, if you would like to do it, I'll be glad to review and merge.
Also, I took all the possible shortcuts while implementing this library, so
a refactoring might help :).
Il giorno ven 9 gen 2015 alle 21:31 Michele Caini [email protected]
ha scritto:
If an object can be represented in multiple possible output formats,
serializers SHOULD use the format which represents the data in the smallest
number of bytes.
I'm quite sure that the issue is mainly related to the spec itself that
does not correctly exploits some strings representation well known and
largely used (I'm going to submit a proposal for a few new types which can
be highly compressed).
Even though the spec does not define the behavior in regard of predefined
types in cases when applications want to override the default
representation and are able to compress the data more than the standard
serializer does, I suspect that each implementation should let the client
to offer a different serializer for any of the predefined and handled type.
For example a client which knows its strings adhere to a well defined
pattern can exploit the fact and the implementation should choose between
the two different approaches using "the format which represents the data in
the smallest number of bytes".
This implementation neither lets user defined functions to be used instead
of the default ones nor lets the clients to propose a different approach.
It prefers the default one and that's all. A different approach could be
appreciated.
—
Reply to this email directly or view it on GitHub #10.
According to this point: https://github.com/msgpack/msgpack/blob/master/spec.md#serialization
I'm quite sure that the issue is mainly related to the spec itself that does not correctly exploits some strings representation well known and largely used (I'm going to submit a proposal for a few new types which can be highly compressed).
Even though the spec does not define the behavior in regard of predefined types in cases when applications want to override the default representation and are able to compress the data more than the standard serializer does, I suspect that each implementation should let the client to offer a different serializer for any of the predefined and handled type.
For example a client which knows its strings adhere to a well defined pattern can exploit the fact and the implementation should choose between the two different approaches using "the format which represents the data in the smallest number of bytes".
This implementation neither lets user defined functions to be used instead of the default ones nor lets the clients to propose a different approach.
It prefers the default one and that's all. A different approach could be appreciated.
The text was updated successfully, but these errors were encountered: