ぽぴ王子の人生プログラミング中

~デバッグもあるでよ!~

目次

ニュース

日記カテゴリ

書庫

Blog 利用状況

リンク

だが、ZIPで!

じゃんぬさんの System.IO.Compression.GZipStream クラスというエントリを見ていて思い出したわけですが、いまやっているプロジェクトでインストーラ(もどき)を作るのに GZipStream クラスを使ってました。インストーラ(だから本当にもどき)が使うデータファイル(中身はインストールするファイル群)を圧縮して持っておくべきだろうなあということで。

最初は System.IO.Compression 名前空間をいろいろ調べていて、DeflateStream クラスで圧縮しておこうと思ったのだけど、これって Deflate アルゴリズムそのものを使えるようにしてくれるだけで、いくら Deflate アルゴリズムが ZIP 形式に採用されているとは言っても ZIP ファイルを作ってくれるわけではないと。

で、使うファイルは複数あるし、それを全部バラバラなファイルのまま圧縮するのも…と思うので、できればまとめて1個のファイルにして圧縮しておきたいわけです。でも System.IO.Compression 名前空間のクラスは1ファイルの圧縮しかしてくれないので、ファイルをまとめる処理は自分で書かなくちゃいけない。この場合独自形式でもいいけれど、独自形式にするとファイルを作るためのアプリケーションを作らなくちゃいけないので、だったらファイル形式さえ自分で何とかしてしまえばファイル作れるんじゃね?と考えたんですよ。

ただ ZIP ファイルは複雑そうでちょっと('A`)マンドクセ、なので TAR ファイルにして GZipStream クラスで圧縮すれば tar.gz ファイルが作れちゃうということで、このへんを参考にして自分で TAR ファイルを作ることにしました。TAR だったらヘッダ部分以外はただ連結するだけなので楽だし。

ちなみに SharpZipLib を使うとか J# のクラスを使うという方法は「ファイルをまとめようとしているのになんで別の DLL を用意せなあかんねん」ということで却下しました。

と、そんな昔話はどうでもいいとして(いいのかよ)シャノンさんのコメントで

System.IO.Packagingはどうなんだろうか(未調査

とか書かれていて、(゚Д゚≡゚Д゚)System.IO.Packagingッテナニナニ?! ということで調べてみました。

この辺によれば、どうやら .NET Framework 3.0 で実装される予定のものらしいですね。System.IO.Packaging.ZipPackage というクラスを使えばお金なんかちょっとでふわふわ! ZIP ファイルもらくらく!うおーすっげーな!でも .NET Framework 3.0… ○| ̄|_

(はわわ、ご主人様、敵が来ちゃいました!!.NET Framework 3.0 って予定どころかすでにリリースされてるじゃん!ということで修正)

余談ですが、Googleで「だがzipで」を検索すると「ぽぴンち。」が一番先頭に来る件について(2007年03月18日現在)。

# 要望があれば今回作った Tar クラスを少し整備して公開してみようかと思います。あくまで「要望があれば」ですが :-)

投稿日時 : 2007年3月18日 14:17

Feedback

# re: だが、ZIPで! 2007/03/18 18:19 シャノン

> どうやら .NET Framework 3.0 で実装される予定のものらしいですね。

…予定?

# re: だが、ZIPで! 2007/03/19 10:27 ぽぴ王子

シャノンさん、コメントありがとうございます。

> …予定?

おおっと、予定じゃないですね orz
.NET Framework 3.0 ってまだリリースされていないのかと思ってました。
去年の11月にはすでにリリースされているのですね(英語版だけ?)
どうも興味のないものはスルーしてしまうもので、全然気にしてませんでした。
マヌケすぎる>自分

指摘どうもありがとうございます。あとで こっそり 直しておきます。

# re: だが、ZIPで! 2007/03/19 12:36 Hirotow

ちなみに日本語ファイル名はどうしてますか?

# re: だが、ZIPで! 2007/03/19 15:41 ぽぴ王子

> ちなみに日本語ファイル名はどうしてますか?

ファイル名はシフトJISで記録しているようです。
自分で作ったクラスは解凍専用ですが、圧縮は tar32.dll を使用しました。
なので、tar32.dll の実装に依存しているかもしれません。
手元に tar32.dll 以外に tar の使える環境がなかったので、それ以上は調べていません。
(自分で解凍さえできればいいという理念だったので)

もし公開するとしたら、そのあたりもちゃんと調べないといけないですね。
あと、圧縮部分の実装も。

# re: だが、ZIPで! 2007/03/19 20:52 とっちゃん

>去年の11月にはすでにリリースされているのですね(英語版だけ?)

「ランタイムは」日本語版もありますよw
「ランタイム」はねw

ドキュメントが日本語化されるのは、Orcas(次期VS)かその次か、はたまたそれより前か...
わかりませんw<MVP Summit でもそんな話はでてないとおもうw

ってか、ドキュメントのローカライズってお金かかるから
お金持ってるところ(要するに商品として売られてるVSのチームとかw)がやってくれないとSDKなドキュメントはいつまで経っても英語のままw
というのが、MVP Summit に行っていちばんよく分ったことだw

ドキュメントはそれをローカライズしても直接的な収益にならないので、出してくれるところがいないとだめなのよw
#間接的な効果だけじゃ金にはならないからねw

だからといって勝手和訳は著作権に引っ掛かるからねぇw
難しいところかとww

# re: だが、ZIPで! 2007/05/31 23:47 ぽぴ王子

ごめんなさい。
リリース予定の話、今頃修正しました…2ヶ月も放置プレイでごめんなさい。
ドMの人もごめんなさい(誰がドMだ)。

# スーパーコピーブランドショップ 2016/02/10 5:32 u4dc0qu809

http://www.wtobrand.com/bottegaveneta-bag1.html
2016年の新素材-新作!高品質 腕時計高品質の追求 超N品を良心価格で提供詳しくは以下のようなブランドがあります。HERMES(バッグ、財布、時計) CHANEL(バッグ、財布、時計)LOUIS VUITTON(バッグ、小物、財布、時計) BVLGARI(財布、時計)Christian Dior(バッグ、財布) COACH(バッグ、財布)GUCCI(バッグ、財布) ROLEX(時計)OMEGA(時計) IWC(時計)FRANCK MULLER(時計) HUBLOT(時計)クロエ CHLOE バッグなどです。ご不明点が ございましたらお気軽にお問い合わせください品質保証 満足保障。 }}}}}}

# カルティエ時計コピー 2017/10/21 7:12 cyrfun@yahoo.co.jp

迅速に対応していただきました。商品状態や配送とも問題なく。良い買い物が出来ました。
★GUCCI グッチ★グッチシマ★プレートキーホルダー★ブラウン×シルバー色★
嫁の誕生日に購入しました。手軽でおしゃれだったので購入しました。かわいいととても喜んでました。

# ゼニス時計 2017/10/23 9:02 thndlgglt@live.jp

注文してから届くまで2日間と、迅速な対応ありがとうございました。
また、ご丁寧にメッセージまでありがとうございます。
初めて新品を買いましたが、価格・品物とも納得出来る商品でした。
プレミアさんにお願いで、もう少し品数があれば良いなと思いました。
★COACH コーチ★シグネチャーストライプタータントップハンドルポーチ★アクセサリーポーチ★F44166★キャンバス×パテントレザー★ピンク系マルチカラー×ブラック★
タータン柄にひと目ぼれしました。とてもかわいいです。
ポーチなので小さめかな?と思っていたら結構まちもあり、ちょっとしたお出かけに重宝しそうです。

# NmjyCbJhRmRPqEtNixo 2021/07/03 1:56 https://eickl.edu.my/wp/members/lenechka-smokvinma

marc jacobs bags outlet ??????30????????????????5??????????????? | ????????

# Hi there all, here every one is sharing these kinds of experience, so it's good to read this blog, and I used to go to see this weblog daily. 2021/07/27 5:59 Hi there all, here every one is sharing these kind

Hi there all, here every one is sharing these kinds of experience, so
it's good to read this blog, and I used to go to see this weblog
daily.

# Link exchange is nothing else but it is simply placing the other person's web site link on your page at appropriate place and other person will also do similar for you. 2021/08/31 16:58 Link exchange is nothing else but it is simply pla

Link exchange is nothing else but it is simply placing the other person's web
site link on your page at appropriate place and other person will also
do similar for you.

# Link exchange is nothing else but it is simply placing the other person's web site link on your page at appropriate place and other person will also do similar for you. 2021/08/31 16:59 Link exchange is nothing else but it is simply pla

Link exchange is nothing else but it is simply placing the other person's web
site link on your page at appropriate place and other person will also
do similar for you.

# Link exchange is nothing else but it is simply placing the other person's web site link on your page at appropriate place and other person will also do similar for you. 2021/08/31 17:00 Link exchange is nothing else but it is simply pla

Link exchange is nothing else but it is simply placing the other person's web
site link on your page at appropriate place and other person will also
do similar for you.

# Link exchange is nothing else but it is simply placing the other person's web site link on your page at appropriate place and other person will also do similar for you. 2021/08/31 17:01 Link exchange is nothing else but it is simply pla

Link exchange is nothing else but it is simply placing the other person's web
site link on your page at appropriate place and other person will also
do similar for you.

# We stumbled over here coming from a different website and thought I might check things out. I like what I see so now i am following you. Look forward to looking over your web page yet again. 2021/09/02 9:48 We stumbled over here coming from a different webs

We stumbled over here coming from a different website and
thought I might check things out. I like what I see so now i am
following you. Look forward to looking over your web page yet again.

# We stumbled over here coming from a different website and thought I might check things out. I like what I see so now i am following you. Look forward to looking over your web page yet again. 2021/09/02 9:49 We stumbled over here coming from a different webs

We stumbled over here coming from a different website and
thought I might check things out. I like what I see so now i am
following you. Look forward to looking over your web page yet again.

# We stumbled over here coming from a different website and thought I might check things out. I like what I see so now i am following you. Look forward to looking over your web page yet again. 2021/09/02 9:50 We stumbled over here coming from a different webs

We stumbled over here coming from a different website and
thought I might check things out. I like what I see so now i am
following you. Look forward to looking over your web page yet again.

# We stumbled over here coming from a different website and thought I might check things out. I like what I see so now i am following you. Look forward to looking over your web page yet again. 2021/09/02 9:51 We stumbled over here coming from a different webs

We stumbled over here coming from a different website and
thought I might check things out. I like what I see so now i am
following you. Look forward to looking over your web page yet again.

# We stumbled over here coming from a different page and thought I might as well check things out. I like what I see so now i'm following you. Look forward to finding out about your web page yet again. 2021/09/05 0:24 We stumbled over here coming from a different page

We stumbled over here coming from a different page and thought I might as well check things out.
I like what I see so now i'm following you.

Look forward to finding out about your web page yet again.

# We stumbled over here coming from a different page and thought I might as well check things out. I like what I see so now i'm following you. Look forward to finding out about your web page yet again. 2021/09/05 0:25 We stumbled over here coming from a different page

We stumbled over here coming from a different page and thought I might as well check things out.
I like what I see so now i'm following you.

Look forward to finding out about your web page yet again.

# We stumbled over here coming from a different page and thought I might as well check things out. I like what I see so now i'm following you. Look forward to finding out about your web page yet again. 2021/09/05 0:26 We stumbled over here coming from a different page

We stumbled over here coming from a different page and thought I might as well check things out.
I like what I see so now i'm following you.

Look forward to finding out about your web page yet again.

# We stumbled over here coming from a different page and thought I might as well check things out. I like what I see so now i'm following you. Look forward to finding out about your web page yet again. 2021/09/05 0:27 We stumbled over here coming from a different page

We stumbled over here coming from a different page and thought I might as well check things out.
I like what I see so now i'm following you.

Look forward to finding out about your web page yet again.

# Heya i am for the primary time here. I found this board and I find It truly helpful & it helped me out a lot. I'm hoping to present one thing again and help others such as you aided me. 2021/09/06 7:40 Heya i am for the primary time here. I found this

Heya i am for the primary time here. I found this board and
I find It truly helpful & it helped me out
a lot. I'm hoping to present one thing again and help others such as you aided me.

# Heya i am for the primary time here. I found this board and I find It truly helpful & it helped me out a lot. I'm hoping to present one thing again and help others such as you aided me. 2021/09/06 7:41 Heya i am for the primary time here. I found this

Heya i am for the primary time here. I found this board and
I find It truly helpful & it helped me out
a lot. I'm hoping to present one thing again and help others such as you aided me.

# Heya i am for the primary time here. I found this board and I find It truly helpful & it helped me out a lot. I'm hoping to present one thing again and help others such as you aided me. 2021/09/06 7:42 Heya i am for the primary time here. I found this

Heya i am for the primary time here. I found this board and
I find It truly helpful & it helped me out
a lot. I'm hoping to present one thing again and help others such as you aided me.

# Heya i am for the primary time here. I found this board and I find It truly helpful & it helped me out a lot. I'm hoping to present one thing again and help others such as you aided me. 2021/09/06 7:43 Heya i am for the primary time here. I found this

Heya i am for the primary time here. I found this board and
I find It truly helpful & it helped me out
a lot. I'm hoping to present one thing again and help others such as you aided me.

# ルイ ヴィトン リング メンズ 2022/07/30 23:23 pdczdwuigb@yahoo.co.jp

3回目の利用です。
土曜日に注文、月曜日の到着。
確認のメールも直ぐにくるので、ストレス無く
お買い物ができます。
梱包も過不足無く、安心です。
おかげで、他店の商品と迷っても
ついついこちらで購入を決めてしまいます。

# where can one get hydroxychloroquine 2022/12/26 6:06 MorrisReaks

https://www.hydroxychloroquinex.com/# purchase hydroxychloroquine

# ロレックスコピー 2023/05/08 23:04 coxAcquic

ロレックス買取"弊社はロレックスの商品特に大人気のロレックスデイトナシリーズのロレックス時計の種類を豊富に取り揃えます。日本ロレックス時計とロレックスレプリカのロレックスコピー品の品質よくて、激安税込み価格でご提供します。 }}}}}}
https://www.bagssjp.com/product/detail-9975.html
https://www.bagssjp.com/product/detail-684.html
https://www.bagssjp.com/product/detail-10927.html
https://www.bagssjp.com/product/detail-5155.html
https://www.bagssjp.com/product/detail-10256.html

# ロレックス レディース 並行輸入 2023/09/23 6:47 rrgmagoms@docomo.ne.jp

この度は、ご丁寧な説明をしていただきまして有難うございました。
説明をしていただいた通り綺麗な商品で購入して大変良かったと思います。
ネットでブランド品を購入するのは心配しましたが返品可能のシステムやお電話の対応の良さで安心して購入出来ました事を感謝しています。
大切に使用して行きたいと思います。
この度は有難うございました。
【最短当日発送】遅くとも1~2営業で出荷可能、全国一律送料無料。販売価格はフリーダイヤルにてご相談させてください♪ルイヴィトン ハンドバッグ モノグラム チェリー スピーディ25 M95009 新品 レディース さくらんぼ ミニボストン ルイ・ヴィトン ルイビトン ルイ ヴィトン ビトン ブランド 男性 女性 母の日 父の日 ギフト 誕生日プレゼント ルイ・ヴィトン
シミや汚れの少ない商品が購入出来てとても嬉しいです。
ネット購入は不安もありましたが夢市場プレミアムさんは届いてから返品可能だと電話で聞いて安心して購入出来ました。
届いた商品もネットの画像や説明で聞いていた通りで納得出来るとても良い品物でした。
新品ではヌメ皮のシミが多い商品なので今回の購入、良い買い物が出来て感謝しています。
手書きの一筆とても嬉しかったです!信頼できるお店です。
ロレックス レディース 並行輸入 https://www.kopi66.com/product/detail.aspx?id=12295

# ブルガリ時計 修理 アウトレット 2023/11/07 15:31 jkjcjoruiv@excite.co.jp

★2023最高等級新しい商品大量入荷!
■在庫情報随時更新!(*^-^*)
■信用第一、良い品質、低価格は。
★歓迎光臨★送料無料(日本全国)
ご注文を待ちしております
よろしくお願いいたします_(._.)_
ブルガリ時計 修理 アウトレット https://www.bagtojapan.com/category/192/1-key=1.htm

タイトル
名前
Url
コメント