Registered Member
|
File has the following format:
1. fixed size header; 2. body; unknown size; 3. fixed size header. Can I define these structure with Okteta? How to determine the size of the file to calculate "body" size? Here is prototype. cat /home/user/.kde/share/apps/okteta/structures/test/main.js function init () { var header = struct( { "header" : int32() } ); var body = array( char(), 0 ); body.updateFunc = function ( main_struct ) { // TODO: how to calculate size? this.length = 2; } var footer = struct( { "footer" : int32() } ); var file = struct( { "header" : header, "body" : body, "footer" : footer } ); return file; } Note. Headers does not contain file size. |
Registered users: Bing [Bot], Evergrowing, Google [Bot]