dominictarr/map-reduce — pull request #15 by chesles (2013-10-26 17:13:27+00:00)
Title: use bytewise for keys

I think I got it right this time. The important part is generating the right min/max keys for ranges: bytewise encodes so that `null` is always sorted first, and `undefined` is always sorted last, so if `true` is our wildcard value, we just have to replace it with the appropriate value to create the min/max range keys.

Other than that it's just a matter of encoding/decoding the array, with the length prepended/removed to keep grouping levels grouped :)