SirCmpwn/Craft.Net — pull request #24 by punkkeks (2012-08-11 06:00:37+00:00)
Title: Handle read and write operations via bit operators

As I promised I made this.
This method is 3-5 times faster than the original version. (A Benchmark can be found here https://gist.github.com/3321590)

I also fixed some mistakes you made, e.g. on BigEndian Systems (yes, they still exist) your solution won't work, because of some Array.Reverse things. Either you use my implementation (which I prefer) or you check if you are on a little endian maschine.

Also added CreateLong and TryReadLong, they were missing.... why?! :D

And last but not least I am not satisfied with your code in general. You don't have any coding standard (sometimes your formal parameters are PascalCase, sometimes they are camalCase... damn dude...)
Also you don't have any documentation which is really ugly. I don't know what CreatePackedByte does, strange indeed.... Also you could write some tests ;) They will make life much easier, trust me.

Netherless, thanks for the inspiration, especially for the crypto things... I never fight with it, but I know now, I will lose this fight :D

Regards