 +
 +   $Id: kate_common.h 3134 2005-10-23 18:21:13Z mosu $
 +
-+   Ogg Kate helper functions
-+
-+   Written by Moritz Bunkus <moritz@bunkus.org>.
++   Kate helper functions
++
++   Written by ogg.k.ogg.k <ogg.k.ogg.k@googlemail.com>.
++   Adapted from code by Moritz Bunkus <moritz@bunkus.org>.
 +*/
 +
 +#ifndef __KATE_COMMON_H

+  header.nheaders = bc.get_bits(8);
+  header.tenc = bc.get_bits(8);
+  header.tdir = bc.get_bits(8);
+  if (0 != bc.get_bits(8))
+      throw error_c("Reserved bits are not 0");
+  header.kfgshift = bc.get_bits(8);
+
+  if (0 != read32(bc))
+      throw error_c("Reserved bits are not 0");
+  if (0 != read32(bc))
+      throw error_c("Reserved bits are not 0");
+  header.gnum = read32(bc);
+  header.gden = read32(bc);
+

+  uint8_t tenc;
+  uint8_t tdir;
+
+  uint8_t kfgshift;
+
+  int32_t gnum;
+  int32_t gden;
+
+  uint8_t language[16];
+  uint8_t category[16];
