restsharp/RestSharp — pull request #200 by tt (2012-01-10 20:09:24+00:00)
Title: Use built-in method for converting byte array to string

This reduces the memory footprint dramatically.

Consider the following:

var buffer = new byte[1024 * 1024 * 100];

var generator = RandomNumberGenerator.Create();
generator.GetBytes(buffer);

This will create a byte array of 100 MiB.

Converting this via `Encoding.GetString()` will increase the overall memory footprint to about 300 MiB.
Converting with the current approach, however, will increase the footprint to ~600 MiB.