

There is still one problem on yours that was mentioned in the lost thread, there is no water in your tank lol. I wonder why yours is mesh and mine isnt. When running the Silverlight version, just reload the page in the browser, and theĪpp.Xaml.That looks awesome! I got my housing like yours in today but the top is solid. You can download the ASP.NET compatible version here, and the Silverlight version here. public static bool Delete(string cookieName) Here is my standard CpCookies class that handles everything: using System using using System.Text using System.Web using System.IO.Compression using .Binary using System.IO using QuickLZSharp using Serialization namespace CompressedCookies You can examine either of these classes in the downloadable solutions I've made Silverlight Serializer is not only very fast, it also produces byteĪrrays that are about 30% smaller than the BinaryFormatter - which of course, I made a couple of contributions to Mike's work, most notably a way to deserializeĪ type that has no parameterless constructor, and he has already incorporated On the byte type, which makes it easier to use.įor Serialization and Deserialization, I chose Mike Talbot's Silverlight SerializerĬlass. The only things I have added to this class are two extension methods Ratios combined with very fast decompression, making it the ideal choice for The QuickLZ algorithm is Silverlight-compatible and provides excellent compression

This choice was based on my research in this article on comparison of Data Compression Algorithms. the same code can be modified so that it will serialize and compress objectsįor the compression algorithm, I chose the QuickLZ data compression library by Lasse The algorithm itself does not have to be used only for cookies Deserialize the byte array into an instance of the original type so it can beĬompressed cookies can be used to store settings, to persist state between page navigations,Īnd other uses. Get the compressed byte array from the base64 encoded cookie value.Ĥ. Read the cookie the way we normally would do.Ģ. To read a compressed cookie, we simply perform the above operations in reverse:ġ. Using our compressed payload as the value. Set a normal HTTP browser cookie with the correct name, value and expiration date Base64 encode the compressed bytes so that they can be stored as legal HTTP CookieĤ. HTTP cookie (approximately 4096 characters).ģ. Compress the byte array to allow for more storage within the legal limit for an

Efficiently serialize whatever object instance we want to store to a byte array.Ģ. To create a compressed cookie, we need to be able to do four things:ġ. Compressed cookies are virtuallyĤ) Performance on both storing and retrieving compressed cookies is excellent. A LOT more information - for example, anĮntire serialized class instance with all it's property values.ģ) Keep prying eyes out of your cookie business. The question now becomes: Why would somebody want to compress an HTTP Cookie? ThereĪre several reasons I can think of, and all of them seem valid to me:Ģ) Store more information in a single cookie. I invented, is one of those successful experiments. The compressed cookie, which I like to think But othersĬan produce really useful things when you are a programmer building up your personalĬodebase of "tricks". Some experiments don't work, and need to be thrown out.

Now, I experiment a bit more safely with code, and to a lesserĮxtent with digitally processed photography (Maya) and music (hang drum, didjeridoo,Īnd flute). I also set Hi Tor mountain in Haverstraw, NY on fire. My CB radio with an illegal 40 watt power tube (the legal limit then was onlyĥ watts). "Redux" part is because it is, as the Latin phrase indicates, "backĪgain" - improved, and now - Silverlight compatible. Simple beauty and depth of some of the foreign films I've come to love. Few Hollywood movies ever achieve the sensitivity, The idea for the original title of this article came from the 1985 Swedish foreignįilm " My Life As a Dog" which I highly reccommend.
