code.topk function

Apply top-k box coding to scale data