Please note, this is a STATIC archive of website from 03 Nov 2016, does not collect or store any user information, there is no "phishing" involved.


« Gecko Plugin API Reference « Plug-in Side Plug-in API


Represents a particular range of bytes from a stream.


typedef struct _NPByteRange
    int32  offset;  /* negative offset = from the end */
    uint32 length;
    struct _NPByteRange* next;
} NPByteRange;


The data structure has the following fields:

Offset in bytes to the start of the requested range. This value may be either positive or negative:
  • Positive value: Offset from the beginning of the stream.
  • Negative value: Offset from the end of the stream.
Number of bytes to fetch from the specified offset.
Points to the next NPByteRange request in the list of requests, or null if this is the last request.


The plug-in seeks within a stream by building a linked list of one or more NPByteRange objects, which represents a set of discontiguous byte ranges. The only plug-in API call that uses the NPByteRange type is NPN_RequestRead(), which lets the plug-in read specified parts of a file without downloading it.

The plug-in is responsible for deleting NPByteRange objects when finished with them. The browser makes a copy if it needs to keep the objects beyond the call to NPN_RequestRead().

See Also


Document Tags and Contributors

 Contributors to this page: teoli, Sheppy, Pmash
 Last updated by: Sheppy,