src/main/data/formats/helpers.js
function typeAtOffset(baseType: any, offsetFieldName: string): any {
  return jBinary.Template({
      baseType: baseType,
      read: function(context) {
        if (+context[offsetFieldName] === 0) {
          return null;
        } else {
          return this.binary.read(this.baseType, +context[offsetFieldName]);
        }
      }
    });
}
function typeAtOffset(baseType: any, offsetFieldName: string): any {
  return jBinary.Template({
      baseType: baseType,
      read: function(context) {
        if (+context[offsetFieldName] === 0) {
          return null;
        } else {
          return this.binary.read(this.baseType, +context[offsetFieldName]);
        }
      }
    });
}
function typeAtOffset ( baseType : any , offsetFieldName : string ) : any { return jBinary . Template ( { baseType : baseType , read : function ( context ) { if ( + context [ offsetFieldName ] === 0 ) { return null ; } else { return this . binary . read ( this . baseType , + context [ offsetFieldName ] ) ; } } } ) ; }
Read a jBinary type at an offset in the buffer specified by another field.
Read a jBinary type at an offset in the buffer specified by another field .