anchor.diff:      rnd(K, X, Sz, sets:new()).
   
   %%====================================================================
  -%% Internal functions
  -%%====================================================================
  +
   rnd(0, _X, _Sz, Set) -> {value, Set};
   rnd(K, X, Sz, Set) ->
       %% Start a new round. Each round hashes the previous round to gen.
  
positive.code: %%%-------------------------------------------------------------------
  %%% File    : etorrent_allowed_fast.erl
  %%% Author  : Jesper Louis Andersen <jlouis@ogre.home>
  %%% Description : 
  %%%
  %%% Created :  3 Aug 2008 by Jesper Louis Andersen <jlouis@ogre.home>
  %%%-------------------------------------------------------------------
  -module(etorrent_allowed_fast).
  
  %% API
  -export([allowed_fast/4]).
  
  %%====================================================================
  %% API
  %%====================================================================
  %%--------------------------------------------------------------------
  %% Function: allowed_fast/3
  %% Args:   Sz ::= integer() - number of pieces in torrent
  %%         Ip ::= integer() - 32 bit
  %%         K  ::= integer() - number of pieces we want in the set
  %%         InfoHash ::= binary() - infohash of torrent.
  %% Description: Compute the allowed fast set for a peer
  %%--------------------------------------------------------------------
  -type ip() :: {integer(), integer(), integer(), integer()}.
  -spec allowed_fast(integer(), ip() | binary(), integer(), binary()) -> {value, set()}.
  allowed_fast(Sz, {B1, B2, B3, B4}, K, InfoHash) ->
  
negative.code: 
  cut(0, _I, _X, _Sz, Set) ->
      %% nNo more pieces wanted
      {value, Set};
  cut(K, 5, X, Sz, Set) ->
      %% We exhausted the X binary. Start a new round.
      rnd(K, X, Sz, Set);
  