with Interfaces;

use Interfaces;

package FILO is

   subtype Index_Type is Natural range 0 .. Natural'Last - 1;
   subtype Index_Type16 is Index_Type range 0 .. Index_Type'Last - 1;
   subtype Index_Type32 is Index_Type16 range 0 .. Index_Type16'Last - 2;

   type Buffer_Type is array (Index_Type range <>) of Unsigned_8;

   function Read_LE16 (Buf : Buffer_Type; Off : Index_Type16) return Unsigned_16
   is
     (Shift_Left (Unsigned_16 (Buf (Off + 1)), 8) or Unsigned_16 (Buf (Off)))
   with
      Pre => Buf'First <= Off and Off + 1 <= Buf'Last;

   function Read_LE32 (Buf : Buffer_Type; Off : Index_Type32) return Unsigned_32
   is
     (Shift_Left (Unsigned_32 (Buf (Off + 3)), 24) or
      Shift_Left (Unsigned_32 (Buf (Off + 2)), 16) or
      Shift_Left (Unsigned_32 (Buf (Off + 1)),  8) or
      Unsigned_32 (Buf (Off)))
   with
      Pre => Buf'First <= Off and Off + 3 <= Buf'Last;

end FILO;
