2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 5 years have passed since last update.

PHPでlz4を使う

Posted at

はじめに

PHPでlz4を使いって解凍したいという要望が社内で出た。
ただ、日本語の資料があまりにもないので個人的に備忘録としてまとめる。

書くこと

  • PHPが動いてるサーバにlz4を入れて動かす方法

書かないこと

  • PHP環境のサーバの構築

lz4とは?

簡単に言えば優秀な圧縮ツール。

手順

$ yum install lz4
$ yum install lz4-devel

$ yum installed list | grep lz4

# lz4.x86_64                            1.7.5-3.el7                    @base
# lz4-devel.x86_64                      1.7.5-3.el7                    @base

$ yum --enablerepo=remi install php-lz4

これで基本的に必要なものは入る。

$ sudo systemctl restart php-fpm

これでプログラム内からlz4_compress()等の関数が呼び出せるようになる。

2
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
2
1

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?