anchor.diff:  %% @end
   -spec to_pos_code(#ot_node_id{}) -> pos_code().
   %% --------------------------------------------------------------------
  -to_pos_code(NId) ->
  +to_pos_code(NId) -> to_pos_code(NId, ?DEFAULT_MAX_DEPTH).
  +
  +%% to_pos_code/2
  +%% --------------------------------------------------------------------
  +%% @doc create pos code from node specification.
  +%%
  +%% @end
  +-spec to_pos_code(#ot_node_id{}, MaxDepth :: pos_integer()) -> pos_code().
  +%% --------------------------------------------------------------------
  +to_pos_code(NId, MaxDepth) ->
       Spec = quperl_octree:to_node_list(NId),
  -    
  +
       {Depth, PosCode} = lists:foldl(fun add_pos_code/2, {0,<<>>}, Spec),
  -    
  +
       <<Depth,
  -      PosCode/bits, 0:((?DEFAULT_MAX_DEPTH-Depth)*3),
  -      0:((8-((3*?DEFAULT_MAX_DEPTH) rem 8)) rem 8)>>.
  +      PosCode/bits, 0:((MaxDepth-Depth)*3),
  +      0:((8-((3*MaxDepth) rem 8)) rem 8)>>.
   
   
   
  
positive.code: %% ====================================================================
  %% API functions
  %% ====================================================================
  -export([is_pos_code/1, to_pos_code/1]).
  
  %% is_pos_code/1
  %% --------------------------------------------------------------------
  
negative.code: %% --------------------------------------------------------------------
  is_pos_code(<<Depth:8,
                _PathCode:(3*?DEFAULT_MAX_DEPTH)/bits,
                _Padding:((8-((3*?DEFAULT_MAX_DEPTH) rem 8)) rem 8)/bits>>)
    when Depth >= ?DEFAULT_MAX_DEPTH -> false;
  
  is_pos_code(<<_Depth:8,
                _PathCode:(3*?DEFAULT_MAX_DEPTH)/bits,
                _Padding:((8-((3*?DEFAULT_MAX_DEPTH) rem 8)) rem 8)/bits>>)  -> true;
  
  