anchor.diff:          // If negative, we will encode the bits of the positive value in two's complement form.
           let isPositive = value > zero
           let value = if isPositive then value else bigint(-1) * value
  +        let mask32 = System.UInt32.MaxValue |> int64 |> fromInt64
           let rec loop (accumBytes:byte list) consumeValue lowBitFound =
               if consumeValue <= zero then
                   // Return, with high byte added to indicate sign if current high bit does not represent correct sign.
  +                let accumBytes =
  +                    // Trim excess leading zeros (or 255s if negative i.e. two's complement)
  +                    if isPositive then accumBytes |> List.skipWhile (fun b -> b = 0uy)
  +                    else accumBytes |> List.skipWhile (fun b -> b = 255uy)
                   let isHighBitOne = List.head accumBytes &&& 0b10000000uy <> 0uy
                   let accumBytes =
                       if isPositive && isHighBitOne then 0uy :: accumBytes
  
positive.code:         // If negative, bits are the two's complement of the positive value.
          // We will reverse the two's complement back to the positive value, and then multiply by -1.
          let isPositive = bytes.[bytes.Length - 1] &&& 0b10000000uy = 0uy
          let rec loop (accumBytes:byte list) currIndex lowBitFound =
              if currIndex = bytes.Length then
                  accumBytes
                  |> List.fold (fun acc b -> (acc <<< 8) ||| (b |> int |> fromInt32)) zero
                  |> fun value -> if isPositive then value else bigint(-1) * value
              else
                  let currByte = bytes.[currIndex]
                  if isPositive then
                      loop (currByte :: accumBytes) (currIndex + 1) false
                  else
                      let currByte, lowBitFound = flipTwosComplement currByte lowBitFound
                      loop (currByte :: accumBytes) (currIndex + 1) lowBitFound
          loop [] 0 false
  
negative.code:                 |> List.toArray
                  |> Array.rev
              else
                  let currValue = consumeValue &&& mask32 |> toUInt32
                  if isPositive then
                      let b0 = currValue |> byte
                      let b1 = currValue >>> 8 |> byte
                      let b2 = currValue >>> 16 |> byte
                      let b3 = currValue >>> 24 |> byte
                      loop (b3 :: b2 :: b1 :: b0 :: accumBytes) (consumeValue >>> 32) false
                  else
                      let b0,lowBitFound = flipTwosComplement (currValue |> byte) lowBitFound
                      let b1,lowBitFound = flipTwosComplement (currValue >>> 8 |> byte) lowBitFound
                      let b2,lowBitFound = flipTwosComplement (currValue >>> 16 |> byte) lowBitFound
                      let b3,lowBitFound = flipTwosComplement (currValue >>> 24 |> byte) lowBitFound
                      loop (b3 :: b2 :: b1 :: b0 :: accumBytes) (consumeValue >>> 32) lowBitFound
          loop [] value false
  
  // Spec:
  