Added a bit tree encoder.