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

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

目次

ニュース

日記カテゴリ

書庫

Blog 利用状況

リンク

tar形式について (1)

元ネタ: vb.net2005でtar圧縮 (C# と VB.NET の質問掲示板)

WinXp、VB.NET2005環境にて
tarを使用してフォルダを圧縮したいと考えています。

tarってファイルをまとめるだけで圧縮しないんだけど、いいのかなーとか思ったり思わなかったりラジバンダリ。質問者さんに参考にならないかも?なんて思いますが、一応書いてみます。

tarファイルのフォーマットは実はすごく簡単なので、自分で作っちゃうことも可能です。というか、わんくま同盟 東京勉強会 #23 C# Dayわんくま同盟 大阪勉強会 #22で話した内容はまさにそんな感じの話です。大阪勉強会であまりの準備不足加減に「続きはWebで!」とか言ってしまったまま放置状態だったので、ウホッ!いい機会だから書いてみようかって感じで。

まず、tarファイルのフォーマットについて調べました。Google先生にお伺いを立てたところ、いくつか見つかりました。

  1. tar32.dllの作者の吉岡さんが書かれたフォーマット説明
  2. HP(ホームページヒューレット・パッカード)のサイトにあった、tarのヘッダ構造体の解説

HPのサイトの方が正確なのだと思いますが、ヘッダ以外にも知りたいこともあるので、吉岡さんの書かれたドキュメントを参考にしてみましょう。

ファイルを作るときは、tarヘッダ512バイト+データ(512バイト単位)の繰り返しになり、最後に1024バイトの終端データ(すべて00で埋められている)が付加されます。512バイトに満たないファイルは512バイトになるように、残りが00で埋められます。

例えば700バイトのファイルを連結[*1]する場合

のような形式になります。この場合、tarファイルの長さは512+512+188+324+1024=2560バイトとなります。

ファイルデータ1と2は便宜上こう表記していますが、実際は一つのデータです。2ファイル以上のファイルを連結する場合はパディングデータの後ろにtarヘッダとファイルデータが続き、最後に終端データが入ります。

今回はここまで。次回はtarヘッダの解説をしようと思います。

[*1]
tarは圧縮するわけではないので、この場合『圧縮』ではなく『連結』と呼びます

投稿日時 : 2009年7月3日 18:19

Feedback

# re: tar形式について (1) 2009/07/03 21:12 やじゅ

私も今回の回答する上で調べて、tarの仕組みを
知ったわけです。tar-gzipって書かれる意味を
今頃知りましたw
ファイル1つ1つ圧縮するより、まとめてから
圧縮した方が小さくなるわけですよね。

では、記事を楽しみしてます。

# re: tar形式について (1) 2009/07/04 3:23 倉田 有大

連載楽しみにしています。
ついでに、RARやLHAやZIPにいってもらえると、がんばって、展開プラグインをつくり・・つく・・挑戦するかも(逃げた

# re: tar形式について (1) 2009/07/04 22:10 刈歩 菜良 CTP

そういえば、ZIPにもいろんな種類があるやんか。
MS-ZIPとかPKUNZIPとか。

続編でそこら辺の違いも知りたかったり<del>ラヂバンダリ</del>

# oakley frogskins 2013/03/21 5:47 http://www.cancunsemanasanta.com/oakley-sunglasses

You know what I'm talking about.I quit!A barking dog doesn't bite!Most people eat, write, and work with their fight hands.You're welcome.A bad workman quarrels with his tools.Do you realize that all of these shirts are half off?It appears to be a true story.We are divided in our opinions.It feels like spring I've been here before

# oakley frogskins 2013/03/24 9:50 http://www.cancunsemanasanta.com/oakley-sunglasses

He dare not tell us his evil conduct.Don't let me down.He seems at little nervous.He thinks himself somebody, but we think him nobody.That's a terrific idea!I am so full that I would burst with another bite.I am so full that I would burst with another bite.Would you like some help? Let go!He has been sick for three weeks

# シャネルJ12時計 2017/09/27 20:01 hbtmdjkklui@excite.co.jp

非常にいい商品です!大満足です。ありがとうございます。
【送料無料】ルイヴィトン ボストンバッグをセール価格で販売中♪ルイヴィトン ボストンバッグ モノグラム クルーザー・バッグ M41138 新品 LOUISVUITTON
非常にいい商品です!大満足です。ありがとうございます。

# グッチコピー 2017/10/16 6:27 vligaczoea@nifty.com

もう何度、お世話になっているのでしょう。
安心してお買い物ができるってこの上ない幸せです。
ブシュロン ネックレスをセール価格で販売中♪ブシュロン ネックレス キャトル クラシック YG WG PG フォーカラー 新品 ミニ ペンダント チョーカー ペンダントトップ
可愛ぃぃ(^^♪
予想していたより小さかったけど、可愛かったので、満足してます。

# シャネル時計コピー 2017/10/30 6:07 ezalelocte@ocn.ne.jp

こんなに 早く 届けられるとは 思わなかったので とても 嬉しかったです 梱包も丁寧にされていて また 何か 探そうと 思います
シャネルリング♪送料無料 新品SAランクシャネル リング ココマーク カラーストーン シャンパンゴールド 約12号 00A 2000年モデル 新品 ラインストーン 艶消し マット ブラック グリーン クリア 150106041 (西) CHANEL COCO
普段使いには このぐらいの 価格が 丁度デスね 品物もとても可愛く 早速 使っています

# Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different internet browsers and both show the same results. 2021/09/05 23:54 Howdy just wanted to give you a quick heads up and

Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly.
I'm not sure why but I think its a linking issue.
I've tried it in two different internet browsers and both show the same results.

# Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different internet browsers and both show the same results. 2021/09/05 23:55 Howdy just wanted to give you a quick heads up and

Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly.
I'm not sure why but I think its a linking issue.
I've tried it in two different internet browsers and both show the same results.

# Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different internet browsers and both show the same results. 2021/09/05 23:56 Howdy just wanted to give you a quick heads up and

Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly.
I'm not sure why but I think its a linking issue.
I've tried it in two different internet browsers and both show the same results.

# Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly. I'm not sure why but I think its a linking issue. I've tried it in two different internet browsers and both show the same results. 2021/09/05 23:57 Howdy just wanted to give you a quick heads up and

Howdy just wanted to give you a quick heads up and let you know a few of the images aren't loading correctly.
I'm not sure why but I think its a linking issue.
I've tried it in two different internet browsers and both show the same results.

# When someone writes an article he/she maintains the image of a user in his/her brain that how a user can be aware of it. Thus that's why this piece of writing is amazing. Thanks! quest bars https://www.iherb.com/search?kw=quest%20bars quest bars 2021/09/14 16:38 When someone writes an article he/she maintains th

When someone writes an article he/she maintains the image of a user
in his/her brain that how a user can be aware of it.
Thus that's why this piece of writing is amazing.
Thanks! quest bars https://www.iherb.com/search?kw=quest%20bars quest bars

# When someone writes an article he/she maintains the image of a user in his/her brain that how a user can be aware of it. Thus that's why this piece of writing is amazing. Thanks! quest bars https://www.iherb.com/search?kw=quest%20bars quest bars 2021/09/14 16:39 When someone writes an article he/she maintains th

When someone writes an article he/she maintains the image of a user
in his/her brain that how a user can be aware of it.
Thus that's why this piece of writing is amazing.
Thanks! quest bars https://www.iherb.com/search?kw=quest%20bars quest bars

# When someone writes an article he/she maintains the image of a user in his/her brain that how a user can be aware of it. Thus that's why this piece of writing is amazing. Thanks! quest bars https://www.iherb.com/search?kw=quest%20bars quest bars 2021/09/14 16:40 When someone writes an article he/she maintains th

When someone writes an article he/she maintains the image of a user
in his/her brain that how a user can be aware of it.
Thus that's why this piece of writing is amazing.
Thanks! quest bars https://www.iherb.com/search?kw=quest%20bars quest bars

# When someone writes an article he/she maintains the image of a user in his/her brain that how a user can be aware of it. Thus that's why this piece of writing is amazing. Thanks! quest bars https://www.iherb.com/search?kw=quest%20bars quest bars 2021/09/14 16:41 When someone writes an article he/she maintains th

When someone writes an article he/she maintains the image of a user
in his/her brain that how a user can be aware of it.
Thus that's why this piece of writing is amazing.
Thanks! quest bars https://www.iherb.com/search?kw=quest%20bars quest bars

# There's certainly a great deal to know about this topic. I really like all the points you've made. 2021/10/25 23:39 There's certainly a great deal to know about this

There's certainly a great deal to know about this topic.
I really like all the points you've made.

# I think this is among the most vital info for me. And i am glad reading your article. But wanna remark on few general things, The site style is perfect, the articles is really excellent : D. Good job, cheers 2021/11/12 12:19 I think this is among the most vital info for me.

I think this is among the most vital info for me. And i am
glad reading your article. But wanna remark on few general things, The site
style is perfect, the articles is really excellent : D.

Good job, cheers

# I think this is among the most vital info for me. And i am glad reading your article. But wanna remark on few general things, The site style is perfect, the articles is really excellent : D. Good job, cheers 2021/11/12 12:19 I think this is among the most vital info for me.

I think this is among the most vital info for me. And i am
glad reading your article. But wanna remark on few general things, The site
style is perfect, the articles is really excellent : D.

Good job, cheers

# I think this is among the most vital info for me. And i am glad reading your article. But wanna remark on few general things, The site style is perfect, the articles is really excellent : D. Good job, cheers 2021/11/12 12:20 I think this is among the most vital info for me.

I think this is among the most vital info for me. And i am
glad reading your article. But wanna remark on few general things, The site
style is perfect, the articles is really excellent : D.

Good job, cheers

# I think this is among the most vital info for me. And i am glad reading your article. But wanna remark on few general things, The site style is perfect, the articles is really excellent : D. Good job, cheers 2021/11/12 12:21 I think this is among the most vital info for me.

I think this is among the most vital info for me. And i am
glad reading your article. But wanna remark on few general things, The site
style is perfect, the articles is really excellent : D.

Good job, cheers

# I will immediately take hold of your rss feed as I can not in finding your e-mail subscription link or e-newsletter service. Do you've any? Please allow me know in order that I may subscribe. Thanks. 2021/12/27 1:37 I will immediately take hold of your rss feed as

I will immediately take hold of your rss feed as I can not in finding your e-mail subscription link or
e-newsletter service. Do you've any? Please allow me know
in order that I may subscribe. Thanks.

# I will immediately take hold of your rss feed as I can not in finding your e-mail subscription link or e-newsletter service. Do you've any? Please allow me know in order that I may subscribe. Thanks. 2021/12/27 1:38 I will immediately take hold of your rss feed as

I will immediately take hold of your rss feed as I can not in finding your e-mail subscription link or
e-newsletter service. Do you've any? Please allow me know
in order that I may subscribe. Thanks.

# I will immediately take hold of your rss feed as I can not in finding your e-mail subscription link or e-newsletter service. Do you've any? Please allow me know in order that I may subscribe. Thanks. 2021/12/27 1:39 I will immediately take hold of your rss feed as

I will immediately take hold of your rss feed as I can not in finding your e-mail subscription link or
e-newsletter service. Do you've any? Please allow me know
in order that I may subscribe. Thanks.

# I will immediately take hold of your rss feed as I can not in finding your e-mail subscription link or e-newsletter service. Do you've any? Please allow me know in order that I may subscribe. Thanks. 2021/12/27 1:39 I will immediately take hold of your rss feed as

I will immediately take hold of your rss feed as I can not in finding your e-mail subscription link or
e-newsletter service. Do you've any? Please allow me know
in order that I may subscribe. Thanks.

# ivermectin cost uk http://stromectolabc.com/
ivermectin generic cream 2022/02/08 10:27 Busjdhj

ivermectin cost uk http://stromectolabc.com/
ivermectin generic cream

# buy doxycycline online without prescription https://doxycyline1st.com/
doxycycline hyclate 100 mg cap 2022/02/25 22:30 Doxycycline

buy doxycycline online without prescription https://doxycyline1st.com/
doxycycline hyclate 100 mg cap

# ed pills https://erectiledysfunctionpills.shop/ 2022/10/14 16:38 Erectile

ed pills https://erectiledysfunctionpills.shop/

# steroids prednisone for sale https://prednisone20mg.icu/ 2022/10/15 7:11 Prednisone

steroids prednisone for sale https://prednisone20mg.icu/

# meet online service https://datingtopreview.com/
our time dating service 2022/10/17 14:23 Dating

meet online service https://datingtopreview.com/
our time dating service

# prednisone online https://prednisonepills.site/
how to purchase prednisone online 2022/11/28 16:51 Prednisone

prednisone online https://prednisonepills.site/
how to purchase prednisone online

# datijg websites https://datingsiteonline.site/
single free dating sites without registering 2022/12/05 17:20 Tading

datijg websites https://datingsiteonline.site/
single free dating sites without registering

# faroedating chat https://datingonline1st.com/
dating single 2023/01/17 17:35 Dating

faroedating chat https://datingonline1st.com/
dating single

# ロレックス レディース 中古 ピンクシェル 2023/03/10 9:02 mydvdxeyp@live.jp

★★ブランド 腕時計★★iphone7/8★★
◇各種のブランドの財布
安価販売大人気 時計★
高品質の問屋! o(∩_∩)o.
新型は発売して、当社はブランドの専門販売会社です。
★信用第一、良い品質、低価格は 私達の勝ち残りの切り札です。
★当社の商品は絶対の自信が御座います。
★S品質 シリアル付きも有り 付属品完備!
★必ずご満足頂ける品質の商品のみ販売しております。
★絶対に満足して頂ける品のみ皆様にお届け致します。
★税関の没収する商品は再度無料にして発送します
★送料無料(日本全国)
ロレックス レディース 中古 ピンクシェル https://www.gmt78.com/d.hatena.ne.jp/keyword/%EF%BF%BD%EF%BF%BD%EF%BF%BD%EF%BF%BD

# buy cytotec pills online cheap - https://cytotecsale.pro/# 2023/04/28 13:10 Cytotec

buy cytotec pills online cheap - https://cytotecsale.pro/#

# ed meds online https://edpill.pro/# - new ed pills 2023/06/27 5:28 EdPills

ed meds online https://edpill.pro/# - new ed pills

# Anna Berezina 2023/09/19 9:40 Mathewelego

Anna Berezina is a renowned inventor and keynoter in the area of psychology. With a family in clinical unhinged and far-flung study experience, Anna has dedicated her career to agreement lenient behavior and daft health: https://calm-canary-fzd2tq.mystrikingly.com/blog/fine-art-with-anna-berezina-capturing-the-essence-of-beauty-in-paintings. Through her form, she has made impressive contributions to the grassland and has fit a respected reflection leader.

Anna's expertise spans several areas of emotions, including cognitive of unsound mind, favourable non compos mentis, and passionate intelligence. Her comprehensive education in these domains allows her to provide valuable insights and strategies exchange for individuals seeking in the flesh flowering and well-being.

As an inventor, Anna has written distinct controlling books that bear garnered widespread recognition and praise. Her books put up for sale practical suggestion and evidence-based approaches to help individuals clear the way fulfilling lives and develop resilient mindsets. Via combining her clinical adroitness with her passion suited for helping others, Anna's writings procure resonated with readers for everyone the world.

# migliori farmacie online 2023 https://farmaciait.pro/ migliori farmacie online 2023 2023/12/04 3:44 Farmacia

migliori farmacie online 2023 https://farmaciait.pro/ migliori farmacie online 2023

# ed meds https://edpills.tech/# new treatments for ed 2023/12/22 23:50 EdPills

ed meds https://edpills.tech/# new treatments for ed

# African Media Spotlight: Foil Cultivated on Celebrities & Trends! 2024/03/26 20:57 Jackieles

In our online publication, we contend to be your reliable documentation after the latest low-down nearly media personalities in Africa. We pay staunch attention to promptly covering the most fitting events as regards illustrious figures on this continent.

Africa is rolling in it in talents and unique voices that shape the cultural and social countryside of the continent. We convergence not only on celebrities and showbiz stars but also on those who up impressive contributions in diverse fields, be it art, politics, art, or philanthropy https://afriquestories.com/2024/03/page/19/

Our articles provide readers with a thorough overview of what is incident in the lives of media personalities in Africa: from the latest news and events to analyzing their clout on society. We living road of actors, musicians, politicians, athletes, and other celebrities to provide you with the freshest dirt firsthand.

Whether it's an upper-class sound out with a revered big draw, an investigation into scandalous events, or a rehashing of the latest trends in the African showbiz world, we utmost to be your rudimentary source of report yon media personalities in Africa. Subscribe to our publication to hamper alert to around the hottest events and engrossing stories from this captivating continent.

# UK Bulletin Nucleus: Arrest In touch on Politics, Economy, Culture & More 2024/03/28 21:19 Tommiemayox

Salutation to our dedicated platform for the sake of staying briefed less the latest communication from the Joint Kingdom. We take cognizance of the importance of being well-informed about the happenings in the UK, whether you're a dweller, an expatriate, or simply interested in British affairs. Our encyclopaedic coverage spans across a number of domains including diplomacy, economy, taste, extravaganza, sports, and more.

In the bailiwick of wirepulling, we living you updated on the intricacies of Westminster, covering parliamentary debates, superintendence policies, and the ever-evolving prospect of British politics. From Brexit negotiations and their bearing on profession and immigration to residential policies affecting healthcare, edification, and the circumstances, we victual insightful analysis and opportune updates to stop you manoeuvre the complex society of British governance - https://newstopukcom.com/get-a-sneak-peek-of-alto-sheffield-s-latest/.

Monetary rumour is crucial in compensation understanding the fiscal vibration of the nation. Our coverage includes reports on superstore trends, organization developments, and profitable indicators, contribution valuable insights in place of investors, entrepreneurs, and consumers alike. Whether it's the latest GDP figures, unemployment rates, or corporate mergers and acquisitions, we strive to deliver meticulous and applicable intelligence to our readers.

# 1win Az?rbaycan: a Kansler Onlayn bahis Terminus 2024/05/07 14:51 Jerometuh

Onlayn bahis platformalar? almaq gordum a tokm?k icind? b?y?nm? dunyada, h?diyy? istifad?cil?r? istirak rahatl?g? bir s?ra evl?rind?n v? ya yoldan qumar oyunlar?n?n formalar?. Bu platformalar ad?t?n tender bir ensiklopedik uzanmaq Idman bahisl?ri, kazino oyunlar? v? daha cox da daxil olmaqla seciml?r. Ucun Qumar?n oldugu Az?rbaycandak? istifad?cil?r pantion T?nziml?n?n, onlayn platformalar c?xarmaq bir prospekt doyus olmaya bil?c?k f?aliyy?tl?rd? sagca haz?r kom?yi kohn? varl?q.

Az?rbaycanda qumar oyunu birind? movcuddur s?s bozluq. Is? mutl?q T?yin olunmus ?razil?rd? qumar oyunlar?n?n formalar? icaz? verilir, onlayn qumar kommutator qaydalar? il? uzl?sir. Bu hokum?t var q?bul olcul?ri kub D?niz bahis veb saytlar?na giris, ancaq muxt?lif Az?rbaycanl?lar sakit okean donm?k ucun universal platformalar ucun qumar ehtiyaclar?. Bu a yarad?r t?klif etm?k ucun Az?rbaycan bazar?na uygun onlayn bahis xidm?tl?ri.

1WIN AZ?RBAYCAN https://1win-azerbaycan-oyuny.top/ A olsayd? s?lahiyy?t verm?k Onlayn bahis platforma Az?rbaycanl? istifad?cil?r? yem?k ist?rdimi uygun bazara qoymaq bir f?rq Xususiyy?tl?r v? t?klifl?r oxsar dig?rin? beyn?lmil?l platformalar. Bunlar ola bil?r anlamaq Idman bahisin? munt?z?m Dunyadak? hadis?l?r, a menzil yuvalardan tutmus kazino oyunlar?ndan yasamaq sat?c? t?crub? v? bonuslar v? promosyonlar c?km?k v? kiritm?k must?ril?r?.

Mobil Uygunluq olard? imperativ ucun istifad?cil?r? yem?k secm?k ucun bahis etm?k ustund? il? etm?k, il? ?hkam iltifat mobil dostluq veb sayt v? ya xususi bir t?tbiq. Od?nis seciml?ri d? olard? diskrekt, yerlik f?rqli ustunlukl?r v? t?min edir guclu ?m?liyyatlar. ?lav? olaraq, must?ri d?st?k verm?k ?zm?k m?hk?m?y? verm?k bir ?ncamc? xasiyy?t Unvanda istifad?ci sorgular v? t?min etm?k fayda verm?k N? laz?m olduqda.

Onlayn bahis platformalar? olmaq rahatl?q v? yay?nma, Budur ?lam?tdar o vaxtdan b?ri istifad?cil?r istifad? etm?k n?sih?t v? punt geri m?suliyy?tl?. M?suliyy?tli kimi qumar t?dbirl?ri depozit M?hdudiyy?tl?r v? ozunu istisna seciml?ri, olmal?d?r movcud ucun kom?k etm?k istifad?cil?r etm?k onlar?n bahis f?aliyy?ti v? qac?nmaq g?l?c?k z?r?r verm?k. Yan?nda t?min etm?k a seyf v? xos bahis milieu, &quot;1&quot; kimi platformalarQ?l?b? qazanmaq Az?rbaycan &quot;ed? bil?rdi yem?k adland?rark?n az?rbaycanl? istifad?cil?rin ehtiyaclar?na german Qaydalar v? t?blig m?suliyy?tli qumar t?crub?l?ri.

# Пробивка скважин на воду в Ленинградской области: особенности и выгоды 2024/11/06 10:38 CharlesMof

Ленинградская область выделяется разнообразной геологической структурой, что превращает задачу пробивки скважин на воду уникальным в каждом районе. Территория включает многообразие грунтов и скрытых структур, которые нуждаются в качественный подбор при поиске позиции и глубины бурения. Подземная вода может находиться как на малой уровне, так и доходить до нескольких сотен, что создает трудность процесса.

Основной деталью, формирующих тип источника (https://www.vizd.ru/effektivnye-metody-prokachki-skvazhiny-ot-peschanyh-otlozhenij/ ), становится грунтовые слои и местоположение водоносного слоя. В Ленинградской области чаще всего сверлят глубинные источники, которые гарантируют доступ к незагрязненной и постоянной воде из скрытых горизонтов. Такие скважины характеризуются длительным сроком службы и качественным качеством ресурса, однако их создание нуждается высоких затрат и профессионального оборудования.

Методы создания в регионе требует использование современных аппаратов и технологий, которые могут справляться с каменистыми породами и избегать возможные разрушения опор скважины. Необходимо помнить, что всегда нужно обращать внимание на природоохранные требования и правила, так как вблизи части населённых пунктов расположены охраняемые водные зоны и заповедники, что требует особый внимание к буровым процессам.

Ресурсы воды из артезианских скважин в Ленинградской области замечательна чистотой, так как она не подвержена от внешних факторов и содержит сбалансированный состав полезных веществ. Это превращает такие водные источники необходимыми для частных домов и компаний, которые выбирают долговечность и стабильное качество водообеспечения.

タイトル
名前
Url
コメント