<commit_before>h2. Metsys.Little

Metsys.Little is a lightweight .NET binary serializer with a focus on compactness and speed. Given the following object:

@var user = new User
	   {
               Id = 433,
               Name = "Goku"
    	       Enabled = true,
	       Initial = null,
               Description = null,
            };@

Metsys.Little will serialize this to a 13 bytes. The built-in BinaryFormatter will take 400 bytes. The object created in the IntegrationTests.NestedTypesWithCollectionOfObjects method serializes to 74 bytes - the BinaryFormatter is over 900.

This is achieved without any cpu-intensive compression or other fancy tricks.

h3. Limitations

Metsys.Little supports built-in value types (int/short/long/float/double/decimal/byte/char/enums/datetime) and strings. It also supports a number of IEnumerable's - with the main exception being Dictionary types (non-generic types aren't likely to work either).

The type must have a default constructor - it can be private.

h3. Usage

Use the Serializer.Serialize method to turn your object into a byte array:
@var data = Serializer.Serialize(new User{...});@

Use the Deserializer.Deserialize method to turn your byte array (or stream) back into your object:
@var user = Deserializer.Deserialize(data);@
<commit_msg>added more usage information<commit_after>h2. Metsys.Little

Metsys.Little is a lightweight .NET binary serializer with a focus on compactness and speed. Given the following object:

@var user = new User
	   {
               Id = 433,
               Name = "Goku"
    	       Enabled = true,
	       Initial = null,
               Description = null,
            };@

Metsys.Little will serialize this to a 13 bytes. The built-in BinaryFormatter will take 400 bytes. The object created in the IntegrationTests.NestedTypesWithCollectionOfObjects method serializes to 74 bytes - the BinaryFormatter is over 900.

This is achieved without any cpu-intensive compression or other fancy tricks.

h3. Limitations

Metsys.Little supports built-in value types (int/short/long/float/double/decimal/byte/char/enums/datetime) and strings. It also supports a number of IEnumerable's - with the main exception being Dictionary types (non-generic types aren't likely to work either).

The type must have a default constructor - it can be private.

h3. Usage

Use the Serializer.Serialize method to turn your object into a byte array:
@var data = Serializer.Serialize(new User{...});@

Use the Deserializer.Deserialize method to turn your byte array (or stream) back into your object:
@var user = Deserializer.Deserialize(data);@

Metsys.Little does not (currently) support versioning. If your object changes (add/remove properties) previously serialized data will not be able to be deserialized. Metsys.Little is suited for short-lived data (shopping carts, session) or where versioning is handled at the application layer.

If you like Little, you may also want to check out "Protobuff":http://code.google.com/p/protobuf/ - there are a number of quality C# implementations. Protobuf supports versioning, can be smaller, and some implementations are faster.

{'fraction_non_alphanumeric': 0.06429026098026734, 'fraction_numerical': 0.010184595798854232, 'mean_word_length': 3.548480463096961, 'pattern_counts': {'":': 1, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '2703269', 'n_tokens_mistral': 870, 'n_tokens_neox': 807, 'n_words': 382}