# nv-buf-rs

> nv-buf-rs =============== - convert a readable-stream to async-function - for remote decode using

Latest version **1.0.4** (published 2022-08-15) · ISC license · 0 weekly downloads

## Install

```sh
npm install nv-buf-rs
pnpm add nv-buf-rs
yarn add nv-buf-rs
bun add nv-buf-rs
```

## Health

**Score 15/100 (F)** — status: abandoned.

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.4 |
| Published | 2022-08-15 |
| First published | 2022-08-15 |
| Weekly downloads | 0 |
| License | ISC |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 3.4 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| Maintainers | ihgazni2 |

## Links

- npm: https://www.npmjs.com/package/nv-buf-rs
- npm.io page: https://npm.io/package/nv-buf-rs

## Recent versions

- 1.0.4 (latest) — 2022-08-15
- 1.0.2 — 2022-08-15
- 1.0.1 — 2022-08-15

## README

nv-buf-rs
===============
- convert a readable-stream to async-function
- for remote decode using
- just for TEST ,performance NOT good

install
=======
- npm install nv-buf-rs 

usage
=====

        const creat_anext = require("nv-buf-rs");
        var anext = creat_anext(rs$);
        await anext();
    
example
-------


        /*
        var s = fs.readFileSync("/opt/JS/nd18/nvnd/out/Release/embedtest")
          > s.length
          48422336
        */


        var rs$ = fs.createReadStream("/opt/JS/nd18/nvnd/out/Release/embedtest")
        var anext = creat_anext(rs$);
        var l = 0;
        var r = await anext()
        while(r!==creat_anext.DFLT_END) {
            console.log(r)
            if(r!==creat_anext.DFLT_EMPTY) {
                l = l + r.length;
            }
            r = await anext()
        }
        /* 
        > l
        48422336
        >
        */ 


API
====
- DFLT\_EMPTY = undefined
- DFLT\_END : Symbol("end")
- creat\_anext(rs$,empty=creat\_anext.DFLT\_EMPTY,sym\_end=creat\_anext.DFLT\_END)=\>anext 
- anext: async ()=> undefined|Buffer|END          


LICENSE
=======
- ISC

---
_Source: https://npm.io/package/nv-buf-rs · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
