encode_OP top-level property

dynamic Function(dynamic v) encode_OP
final

@param {Array} v @param {string} @returns {Array}

Implementation

// encode_OPERAND(v, type) {
//     var d = [];
//     if (Array.isArray(type)) {
//         for (var i = 0; i < type.length; i += 1) {
//             check.argument(v.length == type.length, 'Not enough arguments given for type' + type);
//             d = d.concat(encode_OPERAND(v[i], type[i]));
//         }
//     } else {
//         if (type == 'SID') {
//             d = d.concat(encode_NUMBER(v));
//         } else if (type == 'offset') {
//             // We make it easy for ourselves and always encode offsets as
//             // 4 bytes. This makes offset calculation for the top dict easier.
//             d = d.concat(encode_NUMBER32(v));
//         } else if (type == 'number') {
//             d = d.concat(encode_NUMBER(v));
//         } else if (type == 'real') {
//             d = d.concat(encode_REAL(v));
//         } else {
//             throw new Error('Unknown operand type ' + type);
//             // FIXME Add support for booleans
//         }
//     }

//     return d;
// }

final encode_OP = encode_BYTE;