docs: def save(self, vpk_output_path):
          """
          Saves the VPK at the given path
          """
          with fopen(vpk_output_path, 'wb') as f:
              # write VPK1 header
              f.write(struct.pack("3I", self.signature,
                                        self.version,
                                        self.tree_length))
  
              self.header_length = f.tell()
  
              data_offset = self.header_length + self.tree_length
  
              # write file tree
              for ext in self.tree:
                  f.write("{0}\x00".format(ext).encode('latin-1'))
  
                  for relpath in self.tree[ext]:
                      f.write("{0}\x00".format(relpath).encode('latin-1'))
  
                      for filename in self.tree[ext][relpath]:
                          f.write("{0}\x00".format(filename).encode('latin-1'))
  
                          # append file data
                          metadata_offset = f.tell()
                          file_offset = data_offset
                          real_filename = filename if not ext else "{0}.{1}".format(filename, ext)
                          checksum = 0
                          f.seek(data_offset)
  
                          with fopen(os.path.join(self.path,
                                                  '' if relpath == ' ' else relpath,
                                                  real_filename
                                                  ),
                                     'rb') as pakfile:
                              for chunk in iter(lambda: pakfile.read(1024), b''):
                                  checksum = crc32(chunk, checksum)
                                  f.write(chunk)
  
                          data_offset = f.tell()
                          file_length = f.tell() - file_offset
                          f.seek(metadata_offset)
  
                          # metadata
  
                          # crc32
                          # preload_length
                          # archive_index
                          # archive_offset
                          # file_length
                          # suffix
                          f.write(struct.pack("IHHIIH", checksum & 0xFFffFFff,
                                                        0,
                                                        0x7fff,
                                                        file_offset - self.tree_length - self.header_length,
                                                        file_length,
                                                        0xffff
                                                        ))
  
  
                      # next relpath
                      f.write(b"\x00")
                  # next ext
                  f.write(b"\x00")
              # end of file tree
              f.write(b"\x00")