Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/pujansrt/gzip-json-data
Angular project to read and write gzip json data.
https://github.com/pujansrt/gzip-json-data
angular2 gzip-compression json typescript
Last synced: 11 days ago
JSON representation
Angular project to read and write gzip json data.
- Host: GitHub
- URL: https://github.com/pujansrt/gzip-json-data
- Owner: pujansrt
- Created: 2023-12-27T15:55:19.000Z (12 months ago)
- Default Branch: main
- Last Pushed: 2024-12-09T13:38:58.000Z (14 days ago)
- Last Synced: 2024-12-09T14:42:43.994Z (14 days ago)
- Topics: angular2, gzip-compression, json, typescript
- Language: HTML
- Homepage:
- Size: 273 KB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GzipJsonData
This project was generated with [Angular CLI](https://github.com/angular/angular-cli) version 18.2.12.
## Install Prerequisite
```shell
npm install
```## Development server
Run `ng serve` for a dev server. Navigate to `http://localhost:4200/`.
## File Service
Performs decompress and JSON parse. Please note you can use compressed data either of two ways (see `file.service.ts`)1. Local json gz file lives on angular project (in asset directory) change `const uri = '/assets/json.gz';`
2. json gz file is hosted on a server e.g. change `const uri = 'https://reg01.vn.com/...';`## How to use
```ts
export class TestComponent{
constructor(private fileService: FileService) {
}async testMethod() {
const json = await this.fileService.decompressData();
}
}
```## Reference
[GZip Online Tool](https://www.zickty.com/texttogzip)