anchor.diff:          let device = app.Device
           
           let comp = Compressor(app.Runtime)
  -        
  +        let ref = ReferenceCompressor()
  +
           let rand = RandomSystem()
   
           let pi = 
  -            let pi = PixImage<byte>(Col.Format.RGBA, V2i(64,64))
  +            let pi = PixImage<byte>(Col.Format.RGBA, V2i(8,8))
               pi.GetMatrix<C4b>().SetByCoord(fun (c : V2l) ->
  -                rand.UniformC3f().ToC4b()
  +                if c.X >= 4L then C4b.Red
  +                else C4b.Green
  +                //rand.UniformC3f().ToC4b()
               ) |> ignore
               pi
   
           
           Log.startTimed "CPU"
  -        let cpu = comp.TransformCPU(pi, Quantization.photoshop80) |> Array.chunkBySize 64
  +        let cpu = ref.Transform(pi, Quantization.photoshop80) 
           Log.stop()
   
  +        let cpu = cpu |> Array.chunkBySize 64
  +
           Log.startTimed "GPU"
  -        let gpu = comp.TransformGPU(pi, Quantization.photoshop80) |> Array.chunkBySize 64
  +        let gpuData = comp.Transform(pi, Quantization.photoshop80) 
  +        let gpu = gpuData |> Array.chunkBySize 64
           for i in 0 .. gpu.Length - 1 do
               let cpu = cpu.[i]
               let gpu = gpu.[i]
  
positive.code:         zigZagOrder |> Array.map (fun i -> 
              block.[i]
          )
  
      let transform(data : Image) (alignedSize : V2i) (quality : Quantization) (dctBuffer : Buffer<V4f>) =
          use dctInput = pool |> ComputeShader.newInputBinding dct
  
negative.code:     let next2 (a : int) (v : V2i) =
          V2i(next a v.X, next a v.Y)
  
  module Bit =
      let take (offset : int) (size : int) (word : uint32) =
          if offset >= 32 then 0u
          elif offset <= 0 then
              if size > 0 then
                  word >>> (32 - size)
              else
                  0u
          else
              let e = min 32 (offset + size)
              let size = e - offset
              (word >>> (32 - e)) &&& ((1u <<< size) - 1u)
              
      let toString (offset : int) (size : int) (word : uint32) =
          
          if offset >= 32 then ""
          elif offset <= 0 then
              if size > 0 then
                  let mutable str = ""
                  let mutable mask = 1u <<< (size - 1)
                  let mutable v = word >>> (32 - size)
                  for i in 1 .. size do
                      if v &&& mask <> 0u then str <- str + "1"
                      else str <- str + "0"
                      mask <- mask >>> 1
                  str
              else
                  ""
          else
              let e = min 32 (offset + size)
              let size = e - offset
  
              
              let mutable str = ""
              let mutable mask = 1u <<< (size - 1)
              let mutable v = (word >>> (32 - e)) &&& ((1u <<< size) - 1u)
              for i in 1 .. size do
                  if v &&& mask <> 0u then str <- str + "1"
                  else str <- str + "0"
                  mask <- mask >>> 1
              str
  
      let print (v : uint32) =
          let mutable mask = 0x80000000u
          let mutable str = ""
          let mutable started = false
          for i in 0 .. 31 do
              if v &&& mask <> 0u then
                  started <- true
                  str <- str + "1"
              elif started then
                  str <- str + "0"
              mask <- mask >>> 1
          sprintf "%s" str
  
  type BitStream() =
      let mutable current = 0u
      let mutable currentLength = 0
      let result = System.Collections.Generic.List<byte>()
      let mutable str = ""
  
      static let bla (f : byte[]) =
          f |> Array.collect (fun b ->
  