function compressPositions( geometry ) {

	const position = geometry.attributes.position;

	if ( ! position ) {

		console.error( 'THREE.GeometryCompressionUtils.compressPositions(): Geometry must contain position attribute.' );

	}

	if ( position.isPacked ) return;

	if ( position.itemSize != 3 ) {

		console.error( 'THREE.GeometryCompressionUtils.compressPositions(): position.itemSize is not 3, which cannot be packed.' );

	}

	const array = position.array;
	const encodingBytes = 2;

	const result = quantizedEncode( array, encodingBytes );

	const quantized = result.quantized;

	// IMPORTANT: calculate original geometry bounding info first, before updating packed positions
	if ( geometry.boundingBox == null ) geometry.computeBoundingBox();
	if ( geometry.boundingSphere == null ) geometry.computeBoundingSphere();

	geometry.setAttribute( 'position', new BufferAttribute( quantized, 3 ) );
	geometry.attributes.position.isPacked = true;
	geometry.attributes.position.needsUpdate = true;
	geometry.attributes.position.bytes = quantized.length * encodingBytes;

}
Compressed the given geometry's `position` attribute.

@param {BufferGeometry} geometry - The geometry whose position values should be compressed.