/* * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
 * Copyright by The HDF Group.                                               *
 * Copyright by the Board of Trustees of the University of Illinois.         *
 * All rights reserved.                                                      *
 *                                                                           *
 * This file is part of HDF5.  The full HDF5 copyright notice, including     *
 * terms governing use, modification, and redistribution, is contained in    *
 * the files COPYING and Copyright.html.  COPYING can be found at the root   *
 * of the source code distribution tree; Copyright.html can be found at the  *
 * root level of an installed copy of the electronic HDF5 document set and   *
 * is linked from the top-level documents page.  It can also be found at     *
 * http://hdfgroup.org/HDF5/doc/Copyright.html.  If you do not have          *
 * access to either file, you may request a copy from help@hdfgroup.org.     *
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * */
/*-------------------------------------------------------------------------
 *
 * Created:     H5HFtiny.c
 *          Aug 14 2006
 *          Quincey Koziol <koziol@hdfgroup.org>
 *
 * Purpose:     Routines for "tiny" objects in fractal heap
 *
 *-------------------------------------------------------------------------
 */
/****************/
/* Module Setup */
/****************/
#define H5HF_PACKAGE        /*suppress error about including H5HFpkg  */
/***********/
/* Headers */
/***********/
#include "H5private.h"      /* Generic Functions            */
#include "H5Eprivate.h"     /* Error handling           */
#include "H5HFpkg.h"        /* Fractal heaps            */
/****************/
/* Local Macros */
/****************/
/* Tiny object length information */
#define H5HF_TINY_LEN_SHORT     16              /* Max. length able to be encoded in first heap ID byte */
#define H5HF_TINY_MASK_SHORT    0x0F            /* Mask for length in first heap ID byte */
#define H5HF_TINY_MASK_EXT      0x0FFF          /* Mask for length in two heap ID bytes */
#define H5HF_TINY_MASK_EXT_1    0x0F00          /* Mask for length in first byte of two heap ID bytes */
#define H5HF_TINY_MASK_EXT_2    0x00FF          /* Mask for length in second byte of two heap ID bytes */