sig
  type pos = int64
  val pos_succ : Pdfio.pos -> Pdfio.pos
  val pos_pred : Pdfio.pos -> Pdfio.pos
  val pos_max : Pdfio.pos -> Pdfio.pos -> Pdfio.pos
  val possub : Pdfio.pos -> Pdfio.pos -> Pdfio.pos
  val posadd : Pdfio.pos -> Pdfio.pos -> Pdfio.pos
  val postoi : Pdfio.pos -> int
  val posofi : int -> Pdfio.pos
  val postoi64 : Pdfio.pos -> int64
  val posofi64 : int64 -> Pdfio.pos
  type input = {
    pos_in : unit -> Pdfio.pos;
    seek_in : Pdfio.pos -> unit;
    input_char : unit -> char option;
    input_byte : unit -> int;
    in_channel_length : unit -> Pdfio.pos;
    set_offset : Pdfio.pos -> unit;
  }
  type output = {
    pos_out : unit -> Pdfio.pos;
    seek_out : Pdfio.pos -> unit;
    output_char : char -> unit;
    output_byte : int -> unit;
    out_channel_length : unit -> Pdfio.pos;
  }
  val no_more : int
  val output_of_stream : Utility.stream -> Pdfio.output
  val output_of_channel : Pervasives.out_channel -> Pdfio.output
  val input_of_channel : Pervasives.in_channel -> Pdfio.input
  val input_of_stream : Utility.stream -> Pdfio.input
  val input_of_bytestream : Utility.bytestream -> Pdfio.input
  val input_of_string : string -> Pdfio.input
  val nudge : Pdfio.input -> unit
  val rewind : Pdfio.input -> unit
  val rewind2 : Pdfio.input -> unit
  val rewind3 : Pdfio.input -> unit
  val peek_char : Pdfio.input -> char option
  val peek_byte : Pdfio.input -> int
  val output_string : Pdfio.output -> string -> unit
  val read_char_back : Pdfio.input -> char option
  val read_line : Pdfio.input -> string
  val bytestream_of_input_channel :
    Pervasives.in_channel -> Utility.bytestream
  val bytestream_to_output_channel :
    Pervasives.out_channel -> Utility.bytestream -> unit
  type bitstream
  val bitstream_of_input : Pdfio.input -> Pdfio.bitstream
  val getbit : Pdfio.bitstream -> bool
  val getbitint : Pdfio.bitstream -> int
  val align : Pdfio.bitstream -> unit
  val getval_32 : Pdfio.bitstream -> int -> int32
  type bitstream_write
  val make_write_bitstream : unit -> Pdfio.bitstream_write
  val print_bitstream : Pdfio.bitstream_write -> unit
  val bytestream_of_write_bitstream :
    Pdfio.bitstream_write -> Utility.bytestream
  val putbit : Pdfio.bitstream_write -> int -> unit
  val putbool : Pdfio.bitstream_write -> bool -> unit
  val putval : Pdfio.bitstream_write -> int -> int32 -> unit
  val align_write : Pdfio.bitstream_write -> unit
  val write_bitstream_append :
    Pdfio.bitstream_write -> Pdfio.bitstream_write -> Pdfio.bitstream_write
  val write_bitstream_append_aligned :
    Pdfio.bitstream_write -> Pdfio.bitstream_write -> Pdfio.bitstream_write
  val join_write_bitstreams :
    Pdfio.bitstream_write list -> Pdfio.bitstream_write
  val input_in_bitstream : Pdfio.bitstream -> Pdfio.input
end