title: Dealing with Int64 value with Booksleeve
body: <p>I have a question about Marc Gravell's Booksleeve library.</p>
  
  <p>I tried to understand how booksleeve deal the Int64 value (i have billion long value in Redis actually)</p>
  
  <p>I used reflection to undestand the Set long value overrides.</p>
  
  <pre><code>// BookSleeve.RedisMessage
  protected static void WriteUnified(Stream stream, long value)
  {
  if (value &gt;= 0L &amp;&amp; value &lt;= 99L)
  {
      int i = (int)value;
      if (i &lt;= 9)
      {
          stream.Write(RedisMessage.oneByteIntegerPrefix, 0, RedisMessage.oneByteIntegerPrefix.Length);
          stream.WriteByte((byte)(48 + i));
      }
      else
      {
          stream.Write(RedisMessage.twoByteIntegerPrefix, 0, RedisMessage.twoByteIntegerPrefix.Length);
          stream.WriteByte((byte)(48 + i / 10));
          stream.WriteByte((byte)(48 + i % 10));
      }
  }
  else
  {
      byte[] bytes = Encoding.ASCII.GetBytes(value.ToString());
      stream.WriteByte(36);
      RedisMessage.WriteRaw(stream, (long)bytes.Length);
      stream.Write(bytes, 0, bytes.Length);
  }
  
  stream.Write(RedisMessage.Crlf, 0, 2);
  }
  </code></pre>
  
  <p>I don't understand why, with more than two digits int64, the long is encoding in ascii?</p>
  
  <p>Why don't use byte[] ? I know than i can use byte[] overrides to do this, but i just want to understand this implementation to optimize mine. There may be a relationship with the Redis storage.</p>
  
  <p>By advance thank you Marc :)</p>
  
  <p>P.S : i'm still very enthusiastic about your next major version, than i can use long value key instead of string.</p>