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 🙏

© 2024 – Pkg Stats / Ryan Hefner

@inchingorg/xdata-cli

v1.2.0

Published

Encoding utils

Downloads

5

Readme

xdata-cli is a terminal util to process data, like encoding, decoding, convert encoding methods.

Install

npm install -g xdata-cli

Usage

Encode

Encode string to bytes.

Usage: encode|e [options] <data>

  Encode string to bytes

  Options:

    -h, --help                 output usage information
    -c, --encoding [encoding]  Encoding, default utf-8
    -f, --format [format]      Output format style, options are compressed|map|array, hex is default.

For example:

encode 中国 -c gbk

Base64

Encode:

Usage: b64 encode|e [options] <data>

  Encode plain text string to base64.

  Options:

    -h, --help                 output usage information
    -c, --encoding [encoding]  encoding, default utf-8

Decode:

Usage: b64 decode|d [options] <data>

  Decode base64 to plain text string. 

  Options:

    -h, --help                 output usage information
    -c, --encoding [encoding]  encoding, default utf-8

Decode

Decode bytes to string.

Usage: decode|d [options] <data>

  Decode string data

  Options:

    -h, --help                 output usage information
    -c, --encoding [encoding]  Encoding to be converted from, default utf-8

For example:

decode "d6 d0 b9 fa" -c gbk

Supported encodings

  1. Node.js Native encodings: utf8, ucs2 / utf16le, ascii, binary, base64, hex

  2. Unicode: UTF-16BE, UTF-16 (with BOM)

  3. Single-byte:

    • Windows codepages: 874, 1250-1258 (aliases: cpXXX, winXXX, windowsXXX)
    • ISO codepages: ISO-8859-1 - ISO-8859-16
    • IBM codepages: 437, 737, 775, 808, 850, 852, 855-858, 860-866, 869, 922, 1046, 1124, 1125, 1129, 1133, 1161-1163 (aliases cpXXX, ibmXXX)
    • Mac codepages: maccroatian, maccyrillic, macgreek, maciceland, macroman, macromania, macthai, macturkish, macukraine, maccenteuro, macintosh
    • KOI8 codepages: koi8-r, koi8-u, koi8-ru, koi8-t
    • Miscellaneous: armscii8, rk1048, tcvn, georgianacademy, georgianps, pt154, viscii, iso646cn, iso646jp, hproman8, tis620
  4. Multi-byte:

    • Japanese: Shift_JIS, Windows-31j, Windows932, EUC-JP
    • Chinese: GB2312, GBK, GB18030, Windows936, EUC-CN
    • Korean: KS_C_5601, Windows949, EUC-KR
    • Taiwan/Hong Kong: Big5, Big5-HKSCS, Windows950

Reference

Online Tools