<commit_before># node-elf

This module provides a parser for [ELF](http://en.wikipedia.org/wiki/Executable_and_Linkable_Format)
files.

## Install

    $ npm install nelf

## Usage

Load an ELF file:

```javascript
elf.load('/usr/local/bin/node', function(err, file) {
  if (err) throw err;
  console.log('version: ' + file.version);
  console.log('machine: ' + file.machine);<commit_msg>Add more usage information to README.<commit_after># node-elf

This module provides a parser for [ELF](http://en.wikipedia.org/wiki/Executable_and_Linkable_Format)
files.

## Install

    $ npm install nelf

## Usage

Load an ELF file:

```javascript
elf.load('/usr/local/bin/node', function(err, file) {
  if (err) throw err;
  console.log('version: ' + file.version);
  console.log('machine: ' + file.machine);
});
```

Read a segment:

```javascript
file.readSegment(0x01, function(err, buf) {
});
```

Read a section:

```javascript
file.readSection('.text', function(err, buf) {
{'fraction_non_alphanumeric': 0.1627188465499485, 'fraction_numerical': 0.003089598352214212, 'mean_word_length': 4.5227272727272725, 'pattern_counts': {'":': 0, '<': 3, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '1580674', 'n_tokens_mistral': 342, 'n_tokens_neox': 328, 'n_words': 80}