diff --git a/patterns/db_files/FileBase.pat b/patterns/db_files/FileBase.pat index f8c1883..47e22a8 100644 --- a/patterns/db_files/FileBase.pat +++ b/patterns/db_files/FileBase.pat @@ -45,4 +45,14 @@ fn get_toc_entry(TableOfContents toc, str entry_name) { fn get_offset(TableOfContents toc, str entry_name) { TOCEntry entry = get_toc_entry(toc, entry_name); return entry.offset; +}; + +fn get_size(TableOfContents toc, str entry_name) { + TOCEntry entry = get_toc_entry(toc, entry_name); + return entry.size; +}; + +fn get_end(TableOfContents toc, str entry_name) { + TOCEntry entry = get_toc_entry(toc, entry_name); + return entry.offset + entry.size + 24; }; \ No newline at end of file