Uname: Linux webm016.cluster127.gra.hosting.ovh.net 5.15.167-ovh-vps-grsec-zfs-classid #1 SMP Tue Sep 17 08:14:20 UTC 2024 x86_64
Software: Apache
PHP version: 7.4.33 [ PHP INFO ] PHP os: Linux
Server Ip: 54.36.31.145
Your Ip: 216.73.216.182
User: homesquasz (91404) | Group: users (100)
Safe Mode: OFF
Disable Function:
_dyuweyrj4,_dyuweyrj4r,dl

name : CFFPointer.js
import r from '@foliojs-fork/restructure';

export default class CFFPointer extends r.Pointer {
  constructor(type, options = {}) {
    if (options.type == null) {
      options.type = 'global';
    }

    super(null, type, options);
  }

  decode(stream, parent, operands) {
    this.offsetType = {
      decode: () => operands[0]
    };

    return super.decode(stream, parent, operands);
  }

  encode(stream, value, ctx) {
    if (!stream) {
      // compute the size (so ctx.pointerSize is correct)
      this.offsetType = {
        size: () => 0
      };

      this.size(value, ctx);
      return [new Ptr(0)];
    }

    let ptr = null;
    this.offsetType = {
      encode: (stream, val) => ptr = val
    };

    super.encode(stream, value, ctx);
    return [new Ptr(ptr)];
  }
}

class Ptr {
  constructor(val) {
    this.val = val;
    this.forceLarge = true;
  }

  valueOf() {
    return this.val;
  }
}
© 2026 GrazzMean