package brotli

/* Copyright 2013 Google Inc. All Rights Reserved.

   Distributed under MIT license.
   See file LICENSE for detail or copy at https://opensource.org/licenses/MIT
*/

/* Functions for encoding of integers into prefix codes the amount of extra
   bits, and the actual values of the extra bits. */

/* Here distance_code is an intermediate code, i.e. one of the special codes or
   the actual distance increased by BROTLI_NUM_DISTANCE_SHORT_CODES - 1. */
func prefixEncodeCopyDistance( uint,  uint,  uint,  *uint16,  *uint32) {
	if  < numDistanceShortCodes+ {
		* = uint16()
		* = 0
		return
	} else {
		var  uint = (uint(1) << ( + 2)) + ( - numDistanceShortCodes - )
		var  uint = uint(log2FloorNonZero() - 1)
		var  uint = (1 << ) - 1
		var  uint =  & 
		var  uint = ( >> ) & 1
		var  uint = (2 + ) << 
		var  uint =  - 
		* = uint16(<<10 | (numDistanceShortCodes +  + ((2*(-1) + ) << ) + ))
		* = uint32(( - ) >> )
	}
}