Maple Professional
Maple Academic
Maple Student Edition
Maple Personal Edition
Maple Player
Maple Player for iPad
MapleSim Professional
MapleSim Academic
Maple T.A. - Testing & Assessment
Maple T.A. MAA Placement Test Suite
Möbius - Online Courseware
Machine Design / Industrial Automation
Aerospace
Vehicle Engineering
Robotics
Power Industries
System Simulation and Analysis
Model development for HIL
Plant Modeling for Control Design
Robotics/Motion Control/Mechatronics
Other Application Areas
Mathematics Education
Engineering Education
High Schools & Two-Year Colleges
Testing & Assessment
Students
Financial Modeling
Operations Research
High Performance Computing
Physics
Live Webinars
Recorded Webinars
Upcoming Events
MaplePrimes
Maplesoft Blog
Maplesoft Membership
Maple Ambassador Program
MapleCloud
Technical Whitepapers
E-Mail Newsletters
Maple Books
Math Matters
Application Center
MapleSim Model Gallery
User Case Studies
Exploring Engineering Fundamentals
Teaching Concepts with Maple
Maplesoft Welcome Center
Teacher Resource Center
Student Help Center
StringTools[Compress] - 文字列またはバイト列の圧縮
使い方
Compress(S)
Compress(S, n)
Compress(S, output=f)
パラメータ
S
-
文字列、配列(datatype=integer[1])、またはリスト(整数)
n
(オプション)正整数のバイト数
f
(オプション)出力形式、rtable または list のいずれか
モデルの説明
Compress(S) コマンドは 、与えられた文字列、バイトリスト、または配列 integer[1] を取得して、よりコンパクトで可逆な形式に圧縮します。
デフォルトでは、返される値は with datatype=integer[1] を伴う配列(Array)です 。integer[1] は符号付き整数形式であるため、配列内の値は -128~127の範囲内の値となります。
output=list が指定されると、返される値は 0~256 の範囲内の整数のリストとなります。
配列出力形式とリスト出力形式は共に、readbytes および writebytes と併せて使用するのに適しています。
オプションの値 n は、最初の n バイトのみを圧縮すべきであることを示します。n が指定されない場合またはn <= 0 の場合、あるいは n が実際のバイト数を超える場合、S の全体が圧縮されます。
圧縮アルゴリズムは、Jean-loup Gailly と Mark Adler 記した zlib ライブラリから取ったものです。http://zlib.net を参照してください。
アプリケーションと例題
with(StringTools):
r := Compress("hello world");
Uncompress(r,'output'='string');
関連項目
copyright, readbytes, rtable, StringTools, Uncompress,, writebytes
Download Help Document