npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

flac-seektable

v0.2.2

Published

Stream tap for generating a seek table for a FLAC file stream.

Readme

flac-seektable

Node.js stream tap for generating a seek table for a FLAC file stream. It also supports extracting some of the metadata in the FLAC header (StreamInfo and Vorbis Comments blocks).

Install

# install dependencies
apt-get install libflac-dev

# install the node module
npm install flac-seektable

Limitations

  • Currently only generates the seek table at 1s intervals.
  • Errors detected during FLAC decoding are not propagated to the JS side.
  • The Vorbis comments data is forwarded as-is and the key-value pairs are not parsed.

All of the above limitations will be addressed in future releases.

Usage

const fs = require('fs');
const seektable = require('flac-seektable');

var reader = fs.createReadStream('input.flac');
var writer = fs.createWriteStream('output.flac');
reader
	.pipe(new seektable(function(data) {
		console.log(data);
		/* would output a structure similar to this (or false in case an error occurred):
		{
			seekpoints: [
				{ sample: 0, offset: 0 },
				{ sample: 12288, offset: 11347 },
				{ sample: 28672, offset: 25690 },
				... etc ...
			],
			audio_offset: 136,
			min_blocksize: 4096,
			max_blocksize: 4096,
			min_framesize: 555,
			max_framesize: 4300,
			sample_rate: 16000,
			channels: 1,
			bits_per_sample: 16,
			total_samples: 107200,
			vendor: 'reference libFLAC 1.3.0 20130526',
			md5sum: 'e95f39f3d8b28b55181283cfd7ac98e7',
			tags: [
				// Vorbis Comment format key-value pairs
				'Comment=Processed by SoX'
			]
		}
		*/
	}))
	.pipe(writer);

The seekpoints

{
	sample: 123, // The sample number
	offset: 321  // The offset from the start of the audio stream
}

// The absolute seek position in the FLAC file would then be:
data.audio_offset + data.seekpoints[n].offset
// Where n is an integer in the range [0, data.seekpoints.length)