LAMPIRAN A LISTING PROGRAM

Private Sub Command3_Click() If UBound(OriginalArray) = 0 Then Exit Sub

End MsgBox "There is nothing to End If compress/Decompress" End Sub Else Exit Sub LastCoder = WichCompressor End If Private Sub compress_Click() End If If AutoDecodeIsOn = False Then m1.Visible = True Call Copy_Orig2Work decompress = True m2.Visible = True LastDeCoded = decompress If CompDecomp = 0 Then Exit Sub End Sub If JustLoaded = True Then If CompDecomp = 1 Then decompress = False JustLoaded = False Else Private Sub d1_Click() ReDim UsedCodecs(0) decompress = True CompDecomp = 2 End If End If Dim wktmulai As Single compression.MousePointer = If decompress = True Then MousePointerConstants.vbHourglass Dim decompress As Boolean LastUsed = wktmulai = Timer Dim Dummy As Boolean UsedCodecs(UBound(UsedCodecs)) Call DeCompress_arithmetic_Dynamic(hasil) Dim StTime As Double If JustLoaded = True Then LastUsed = 0 Label12.Caption = Timer - wktmulai & " detik" Dim Text As String If WichCompressor <> LastUsed Then compression.MousePointer = Dim LastUsed As Integer Text = "This is not compressed with ." & MousePointerConstants.vbDefault Chr(13) Call Show_Statistics(False, hasil) MsgBox Text

A-1

Call afterContent(hasil) If AutoDecodeIsOn = False Then End If

compression.save.Visible = True decompress = True Call Copy_Orig2Work

d1.Visible = False If CompDecomp = 0 Then Exit Sub LastDeCoded = decompress

d2.Visible = False If CompDecomp = 1 Then decompress = False If JustLoaded = True Then

End Sub Else JustLoaded = False

decompress = True ReDim UsedCodecs(0)

Private Sub d2_Click() End If End If

CompDecomp = 2 If decompress = True Then compression.MousePointer = MousePointerConstants.vbHourglass Dim wktmulai As Single LastUsed = UsedCodecs(UBound(UsedCodecs)) wktmulai = Timer Dim decompress As Boolean If JustLoaded = True Then LastUsed = 0 Call DeCompress_ReducerDynamicGol(hasil) Dim Dummy As Boolean If WichCompressor <> LastUsed Then Label12.Caption = Timer - wktmulai & " detik" Dim StTime As Double Text = "This is not compressed with ." & compression.MousePointer = Dim Text As String Chr(13) MousePointerConstants.vbDefault

Dim LastUsed As Integer MsgBox Text Call Show_Statistics(False, hasil)

If UBound(OriginalArray) = 0 Then Exit Sub Call afterContent(hasil)

MsgBox "There is nothing to End If compression.save.Visible = True compress/Decompress" Else d1.Visible = False Exit Sub LastCoder = WichCompressor d2.Visible = False End If

A-2

End Sub Dim Text As String Text = "This is not compressed with ." & Chr(13) Dim LastUsed As Integer MsgBox Text Private Sub Form_Load() If UBound(OriginalArray) = 0 Then Exit Sub Dim X As Integer MsgBox "There is nothing to compress/Decompress" End If Dim Y As Integer Exit Sub Else Dim MaxWidth As Double End If LastCoder = WichCompressor ReDim OriginalArray(0) If AutoDecodeIsOn = False Then End If ReDim hasil(0) decompress = True Call Copy_Orig2Work ReDim UsedCodecs(0) If CompDecomp = 0 Then Exit Sub LastDeCoded = decompress CompDecomp = 0 If CompDecomp = 1 Then decompress = False If JustLoaded = True Then End Sub Else JustLoaded = False

decompress = True ReDim UsedCodecs(0) Private Sub m1_Click() End If End If CompDecomp = 1 If decompress = True Then compression.MousePointer = Dim wktmulai As Single MousePointerConstants.vbHourglass LastUsed = Dim decompress As Boolean UsedCodecs(UBound(UsedCodecs)) wktmulai = Timer

Dim Dummy As Boolean If JustLoaded = True Then LastUsed = 0 Call Compress_arithmetic_Dynamic(hasil)

Dim StTime As Double If WichCompressor <> LastUsed Then Label12.Caption = Timer - wktmulai & " detik"

A-3

compression.MousePointer = MsgBox "There is nothing to End If MousePointerConstants.vbDefault compress/Decompress" Else Call Show_Statistics(False, hasil) Exit Sub LastCoder = WichCompressor Call afterContent(hasil) End If End If compression.save.Visible = True If AutoDecodeIsOn = False Then Call Copy_Orig2Work m1.Visible = False decompress = True LastDeCoded = decompress m2.Visible = False If CompDecomp = 0 Then Exit Sub If JustLoaded = True Then End Sub If CompDecomp = 1 Then decompress = False JustLoaded = False Else ReDim UsedCodecs(0) Private Sub m2_Click() decompress = True End If CompDecomp = 1 End If compression.MousePointer = Dim wktmulai As Single If decompress = True Then MousePointerConstants.vbHourglass

Dim decompress As Boolean LastUsed = wktmulai = Timer UsedCodecs(UBound(UsedCodecs)) Dim Dummy As Boolean Call Compress_ReducerDynamicGol(hasil) If JustLoaded = True Then LastUsed = 0 Dim StTime As Double Label12.Caption = Timer - wktmulai & " detik" If WichCompressor <> LastUsed Then Dim Text As String compression.MousePointer = Text = "This is not compressed with ." & MousePointerConstants.vbDefault Dim LastUsed As Integer Chr(13) Call Show_Statistics(False, hasil) If UBound(OriginalArray) = 0 Then MsgBox Text

Exit Sub

A-4

Call afterContent(hasil) Private Sub Decompress_Click() Buffer As Integer

compression.save.Visible = True d1.Visible = True BitPos As Integer

m1.Visible = False d2.Visible = True End Type

m2.Visible = False End Sub Private Stream(1) As BytePos '0=control 1=BitStreams End Sub Private Sub Save_Click() Private CharCount(256) As Long Private Sub open_Click() Call Save_File_As(hasil, False) Private Dictionary As String Dim OldFileName As String End Sub Private BitsForHeader As Integer '1=max 6 chars OldFileName = LoadFileName 2=max 30 chars 3=more then 30 chars

Cdlg.DialogTitle = "Select the file you want to Private Golomb(8) As Integer explore" GOLOMB Private RetGolomb(15) As Integer Cdlg.FileName = "" Option Explicit Private BitsToFollow(8) As Integer Cdlg.ShowOpen Public Sub LoadFileName = Cdlg.FileName Compress_ReducerDynamicGol(ByteArray() As 'This is a 1 run method but we have to keep the Byte) Call load_File(LoadFileName) whole contents Dim X As Long If LoadFileName = "" Then LoadFileName = 'in memory until some variables are saved wich are OldFileName needed bij the decompressor Dim Y As Long

Call Show_Contents(OriginalArray) Private Type BytePos Dim NoMore As Boolean

End Sub Data() As Byte Dim Most As Long

Position As Long Dim NewFileLen As Long

A-5

Dim Nuchar As Byte ReDim Preserve ByteArray(NewFileLen) = Stream(X).Data(Stream(X).Position - 1) UBound(Stream(X).Data) And &HFF Dim CharCount(255) As Long Next NewFileLen = NewFileLen + 1 Call Init_ReducerDynamicGol 'whe calculate the new length of the new data Next 'whe only read the stream and convert them to bitstreams NewFileLen = 0 For X = 0 To 1

For X = 0 To UBound(ByteArray) For X = 0 To 1 For Y = 0 To UBound(Stream(X).Data)

Call AddValueToStream(CInt(ByteArray(X))) NewFileLen = NewFileLen + ByteArray(NewFileLen) = Stream(X).Data(Y) UBound(Stream(X).Data) + 1 Next NewFileLen = NewFileLen + 1 Next 'send the EOF-marker Next ReDim ByteArray(NewFileLen + 3) Call AddValueToStream(256) Next 'here we store the compressed data 'lets fill the leftovers End Sub NewFileLen = 0 For X = 0 To 1 Public Sub For X = 0 To 0 DeCompress_ReducerDynamicGol(ByteArray() As Do While Stream(X).BitPos > 0 Byte) ByteArray(NewFileLen) = Call AddBitsToStream(Stream(X), 0, 1) (UBound(Stream(X).Data) And &HFF0000) / Dim OutStream() As Byte &H10000 Loop Dim OutPos As Long NewFileLen = NewFileLen + 1 Next Dim InposCont As Long ByteArray(NewFileLen) = 'Lets restore the bounderies (UBound(Stream(X).Data) And &HFF00) / &H100 Dim InContBit As Integer

For X = 0 To 1 NewFileLen = NewFileLen + 1 Dim InposData As Long

Dim InDataBit As Integer

A-6

Dim Char As Integer Temp = 0 End Sub

Dim NumBits As Integer Temp = Temp * 2 + ReadBitsFromArray(ByteArray, InposCont, Dim X As Long InContBit, 2) Private Sub Init_ReducerDynamicGol()

Dim Temp As Byte Do While RetGolomb(Temp) = 0 Dim X As Integer

ReDim OutStream(500) Temp = Temp * 2 + Dictionary = "" ReadBitsFromArray(ByteArray, InposCont, Call Init_ReducerDynamicGol InContBit, 1) For X = 0 To 255

InposCont = 0 Loop Dictionary = Dictionary & Chr(X)

InposData = 0 NumBits = RetGolomb(Temp) CharCount(X) = 0

For X = 0 To 2 Char = ReadBitsFromArray(ByteArray, Next InposData, InDataBit, NumBits) InposData = CLng(InposData) * 256 + CharCount(256) = 0 ByteArray(InposCont) Char = ExpanderBits(NumBits, Char) BitsForHeader = 3 InposCont = InposCont + 1 If Char = 256 Then Exit Do For X = 0 To 1 Next Call AddCharToArray(OutStream, OutPos, CByte(Char)) ReDim Stream(X).Data(500) InposData = InposData + InposCont + 1 Loop Stream(X).BitPos = 0 InContBit = 0 ReDim ByteArray(OutPos - 1) Stream(X).Buffer = 0 InDataBit = 0 For X = 0 To OutPos - 1 Stream(X).Position = 0 OutPos = 0 ByteArray(X) = OutStream(X) Next Do Next Golomb(1) = 0: BitsToFollow(1) = 2 '00 NumBits = 0

A-7

Golomb(2) = 1: BitsToFollow(2) = 2 '01 End Sub End Function

Golomb(3) = 4: BitsToFollow(3) = 3 '100

Golomb(4) = 5: BitsToFollow(4) = 3 '101 Private Function ReducerBits(Char As Integer) As Private Function ExpanderBits(BitsNum As Integer, Integer BytePos As Integer) As Integer Golomb(5) = 12: BitsToFollow(5) = 4 '1100 Dim DiPos As Integer If BitsNum = 8 And BytePos = 255 Then Golomb(6) = 13: BitsToFollow(6) = 4 '1101 ExpanderBits = 256: Exit Function Dim TotPos As Integer Golomb(7) = 14: BitsToFollow(7) = 4 '1110 Dim TotPos As Integer Dim Y As Integer Golomb(8) = 15: BitsToFollow(8) = 4 '1111 Dim Y As Integer If Char = 256 Then ReducerBits = 8: Char = 255: For X = 0 To 15 Exit Function For Y = 1 To BitsNum - 1

RetGolomb(X) = 0 DiPos = InStr(Dictionary, Chr(Char)) - 1 TotPos = TotPos + 2 ^ Y

Next Call update_Model(Char) Next

RetGolomb(0) = 1 For Y = 1 To 8 TotPos = TotPos + BytePos + 1

RetGolomb(1) = 2 If DiPos >= TotPos And DiPos < TotPos + 2 ^ ExpanderBits = Asc(Mid(Dictionary, TotPos, 1)) Y Then RetGolomb(4) = 3 Call update_Model(ExpanderBits) ReducerBits = Y RetGolomb(5) = 4 End Function Char = DiPos - TotPos RetGolomb(12) = 5 Exit Function RetGolomb(13) = 6 Private Sub update_Model(Char As Integer) End If RetGolomb(14) = 7 Dim Dictpos As Integer TotPos = TotPos + 2 ^ Y RetGolomb(15) = 8 Dim OldPos As Integer Next

A-8

Dim Temp As Long BitsDeep = ReducerBits(Number) Toarray.Buffer = Toarray.Buffer * 2 + (-1 * ((Number And 2 ^ X) > 0)) Dictpos = InStr(Dictionary, Chr(Char)) Call AddBitsToStream(Stream(0), Golomb(BitsDeep), BitsToFollow(BitsDeep)) Toarray.BitPos = Toarray.BitPos + 1 OldPos = Dictpos Call AddBitsToStream(Stream(1), Number, If Toarray.BitPos = 8 Then CharCount(Dictpos) = CharCount(Dictpos) + 1 BitsDeep) If Toarray.Position > UBound(Toarray.Data) Do While Dictpos > 1 And CharCount(Dictpos) >= End Sub Then ReDim Preserve CharCount(Dictpos - 1) Toarray.Data(Toarray.Position + 500)

Temp = CharCount(Dictpos - 1) Toarray.Data(Toarray.Position) = 'this sub will add an amount of bits to a sertain Toarray.Buffer CharCount(Dictpos - 1) = CharCount(Dictpos) stream Toarray.BitPos = 0 CharCount(Dictpos) = Temp Private Sub AddBitsToStream(Toarray As BytePos, Number As Integer, NumBits As Integer) Toarray.Buffer = 0 Dictpos = Dictpos - 1 Dim X As Long Toarray.Position = Toarray.Position + 1 Loop If NumBits = 8 And Toarray.BitPos = 0 Then End If If OldPos = Dictpos Then Exit Sub If Toarray.Position > UBound(Toarray.Data) Next Dictionary = Left(Dictionary, Dictpos - 1) & Then ReDim Preserve Chr(Char) & Mid(Dictionary, Dictpos, OldPos - Toarray.Data(Toarray.Position + 500) End Sub Dictpos) & Mid(Dictionary, OldPos + 1) Toarray.Data(Toarray.Position) = Number And End Sub &HFF 'this function will return a value out of the amaunt of Toarray.Position = Toarray.Position + 1 bits you asked for

Private Sub AddValueToStream(Number As Exit Sub Private Function ReadBitsFromArray(FromArray() Integer) As Byte, FromPos As Long, FromBit As Integer, End If NumBits As Integer) As Long Dim BitsDeep As Integer For X = NumBits - 1 To 0 Step -1 Dim X As Integer

A-9

Dim Temp As Long End Function Private Const MaxBits As Integer = 24

For X = 1 To NumBits Private Bits_To_Follow As Integer

Temp = Temp * 2 + (-1 * 'this sub will add a char into the outputstream Private Const EOF_Symbol = 256 ((FromArray(FromPos) And 2 ^ (7 - FromBit)) > 0)) Private Sub AddCharToArray(Toarray() As Byte, Public Sub FromBit = FromBit + 1 ToPos As Long, Char As Byte) Compress_arithmetic_Dynamic(ByteArray() As Byte) If FromBit = 8 Then If ToPos > UBound(Toarray) Then ReDim Preserve Toarray(ToPos + 500) Dim InpPos As Long If FromPos + 1 > UBound(FromArray) Then Toarray(ToPos) = Char Do While X < NumBits Dim Low As Long ToPos = ToPos + 1 Temp = Temp * 2 Dim High As Long End Sub X = X + 1 Dim Range As Long

Loop Dim Half As Long ARITHMATIC FromPos = FromPos + 1 Dim First_Qtr As Long Option Explicit Exit For Dim Third_Qtr As Long

End If 'This is a 1 run method Dim Mid As Long

FromPos = FromPos + 1 Private OutStream() As Byte Dim TotChars As Long

FromBit = 0 Private OutPos As Long Dim Char As Integer

End If Private OutBitCount As Integer Dim Index As Integer

Next Private OutByteBuf As Byte Dim X As Integer

ReadBitsFromArray = Temp Private CharCount(257) As Long Call Init_Arithmetic_Dynamic

A-10

Low = 0 If High < Half Then High = 2 * High + 1 '* Scale up code range. *' High = (2 ^ MaxBits) - 1 Call Bit_Plus_Follow(0) '* Output 0 if in low half. *' Loop Half = High / 2 ElseIf Low >= Half Then '* If Char = EOF_Symbol Then Exit Do First_Qtr = Half / 2 Output 1 if in high half.*' Call update_Model(Char) Third_Qtr = Half + First_Qtr Call Bit_Plus_Follow(1) Loop Char = 0 Low = Low - Half For X = MaxBits - 1 To 0 Step -1 Do High = High - Half '* Subtract offset to top. *' If (Low And 2 ^ X) = 0 Then If InpPos > UBound(ByteArray) Then ElseIf Low >= First_Qtr And High < Call AddBitsToOutStream(0, 1) Char = EOF_Symbol Third_Qtr Then '* Output an opposite bit *' Else Else Bits_To_Follow = Bits_To_Follow + 1 Call AddBitsToOutStream(1, 1) Char = ByteArray(InpPos) '* later if in middle half. *' End If End If Low = Low - First_Qtr '* Next InpPos = InpPos + 1 Subtract offset to middle*' Do While OutBitCount > 0 Range = High - Low High = High - First_Qtr Call AddBitsToOutStream(1, 1) High = Low + CLng(Range * Else '* Otherwise exit loop. *' (CharCount(Char) / CharCount(0))) Loop Exit Do Low = Low + CLng(Range * ReDim ByteArray(OutPos - 1) End If (CharCount(Char + 1) / CharCount(0))) Call CopyMem(ByteArray(0), OutStream(0), Low = 2 * Low Do OutPos)

A-11

End Sub Dim Temp As Integer If OutPos = 15 Then

Dim X As Integer OutPos = 15

Public Sub Call Init_Arithmetic_Dynamic End If DeCompress_arithmetic_Dynamic(ByteArray() As Byte) Value = 0 Range = High - Low

Dim InpPos As Long InpPos = 0 Counter = Int((Value - Low + 1) * (CharCount(0) / Range)) Dim InBitPos As Integer InBitPos = 0 For Char = 0 To 256 Dim Low As Long Value = ReadBitsFromArray(ByteArray, InpPos, InBitPos, MaxBits) If CharCount(Char) <= Counter Then Dim High As Long Low = 0 Exit For Dim Range As Long High = (2 ^ MaxBits) - 1 End If Dim Half As Long Half = High / 2 Next Dim First_Qtr As Long First_Qtr = Half / 2 Char = Char - 1 Dim Third_Qtr As Long Third_Qtr = Half + First_Qtr If Char = EOF_Symbol Then Exit Do Dim Mid As Long Char = 0 High = Low + CLng(Range * Dim Value As Long (CharCount(Char) / CharCount(0))) Do Dim TotChars As Long Low = Low + CLng(Range * If InpPos > UBound(ByteArray) Then (CharCount(Char + 1) / CharCount(0))) Dim Char As Integer Exit Do Call update_Model(Char) Dim Index As Integer End If Call AddValueToOutStream(Char) Dim Counter As Long

A-12

Do '* Loop to get rid of Low = Low - First_Qtr '* End Sub bits. *' Subtract offset to middle*'

If InpPos <= UBound(ByteArray) Then High = High - First_Qtr Private Sub Init_Arithmetic_Dynamic() If High < Half Then Value = 2 * Value + ReadBitsFromArray(ByteArray, InpPos, Dim X As Integer '* nothing *' '* Expand InBitPos, 1) '* Move in next input bit. *' low half. *' ReDim OutStream(500) Else '* Otherwise exit loop. *' Value = 2 * Value + OutPos = 0 ReadBitsFromArray(ByteArray, InpPos, Exit Do InBitPos, 1) '* Move in next input bit. *' OutBitCount = 0 End If ElseIf Low >= Half Then '* OutByteBuf = 0 Expand high half. *' Low = 2 * Low Bits_To_Follow = 0 Value = Value - Half High = 2 * High + 1 '* Scale up code range. *' For X = 0 To 257 Low = Low - Half '* CharCount(X) = 258 - X Subtract offset to top. *' Else Next High = High - Half Exit Do End Sub Value = 2 * Value + End If ReadBitsFromArray(ByteArray, InpPos, InBitPos, 1) '* Move in next input bit. *' Loop Private Sub update_Model(Index As Integer) ElseIf Low >= First_Qtr And High < Loop Third_Qtr Then '* Expand middle half. *' ReDim ByteArray(OutPos - 1) Dim I As Integer Value = Value - First_Qtr Call CopyMem(ByteArray(0), OutStream(0), I = Index OutPos) Do While I >= 0

A-13

CharCount(I) = CharCount(I) + 1 OutStream(OutPos) = Number End If

I = I - 1 OutPos = OutPos + 1 End If

Loop End Sub Next

End Sub End Sub

Private Sub AddBitsToOutStream(Number As Long, NumBits As Integer) Private Sub Bit_Plus_Follow(Bit As Integer) 'this function will return a value out of the Dim X As Long amaunt of bits you asked for Call AddBitsToOutStream(CLng(Bit), 1) '* Output the bit. *' For X = NumBits - 1 To 0 Step -1 Private Function ReadBitsFromArray(FromArray() As Byte, Do While Bits_To_Follow > 0 OutByteBuf = OutByteBuf * 2 + (-1 * FromPos As Long, FromBit As Integer, NumBits ((Number And CDbl(2 ^ X)) > 0)) As Integer) As Long Call AddBitsToOutStream(1 - Bit, 1) '* Output bits_to_follow *' OutBitCount = OutBitCount + 1 Dim X As Integer

Bits_To_Follow = Bits_To_Follow - 1 If OutBitCount = 8 Then Dim Temp As Long '* opposite bits. Set *' OutStream(OutPos) = OutByteBuf For X = 1 To NumBits Loop '* bits_to_follow to zero. *' OutBitCount = 0 Temp = Temp * 2 + (-1 * ((FromArray(FromPos) And 2 ^ (7 - FromBit)) > End Sub OutByteBuf = 0 0))

OutPos = OutPos + 1 FromBit = FromBit + 1

Private Sub AddValueToOutStream(Number If OutPos > UBound(OutStream) Then If FromBit = 8 Then As Integer) ReDim Preserve OutStream(OutPos + If FromPos + 1 > UBound(FromArray) If OutPos > UBound(OutStream) Then 500) Then ReDim Preserve OutStream(OutPos + 100)

A-14

Do While X < NumBits Public CompDecomp As Integer 'result from compress or decompress Temp = Temp * 2 Public OriginalArray() As Byte 'array screen to store the original X = X + 1

Public OriginalSize As Long 'size of Loop the original file 'constants for the coder types FromPos = FromPos + 1 Public hasil() As Byte 'array to store Public Const Coder_Differantiator = 1 Exit For the results Public Const Coder_FrequentieShifter = 2 End If Public LoadFileName As String 'which file is loeded Public Const Coder_BWT = 3 FromPos = FromPos + 1 Public JustLoaded As Boolean 'to Public Const Coder_Fix128 = 4 FromBit = 0 see if the original file is just loaded Public Const Coder_Flatter64 = 5 End If Public DictionarySize As Integer 'for Public Const Coder_MTF_No_Header = 6 Next use with LZW and LZSS compressors Public Const Coder_MTF_With_Header = ReadBitsFromArray = Temp Public LastCoder As Integer 'wich 7 coder is used last End Function Public Const Coder_SortSwap = 8 Public UsedCodecs() As Integer 'to

store the used Public Const Coder_Used_To_Front = 9 Global module Public LastDeCoded As Boolean 'to Public Const Coder_ValueDownShift = 10 Public Declare Sub CopyMem Lib see what has happen lately Public Const Coder_ValueUpShift = 11 "kernel32" Alias "RtlMoveMemory" Public AritmaticRescale As Boolean 'to (Destination As Any, source As Any, ByVal set rescale on Public Const Coder_ValueTwister = 12 Length As Long)

A-15

Public Const Coder_Fix128B = 13 'the user to say which compressor/coder Public Sub Copy_Work2Orig() is used Public Const Coder_Seperator = 14 ReDim OriginalArray(UBound(hasil)) Public Sub Init_CoderNameDataBase() Public Const Coder_Flatter16 = 15 Call CopyMem(OriginalArray(0), hasil(0), CompName(Compressor_EliasGamma) UBound(hasil) + 1) Public Const Coder_Base64 = 16 = "Elias Gamma" End Sub Public Const Coder_Numerator = 17 End Sub

Public Const Coder_Numerator2 = 18 'This sub is used to start a coder Public Const Coder_AddDifferantiator = 19 'copy original array to the hasil so that whe can work on it without 'whichcoder is the constant of the Public Const Coder_Scrambler = 20 codertype 'changing the original contents Private CodName(20) As String 'Decode is used to say if we want to code Public Sub Copy_Orig2Work() or decode 'constants for the compressor types ReDim hasil(UBound(OriginalArray)) Public Sub Start_Coder(WichCoder) Public Const Compressor_EliasGamma = 16 Call CopyMem(hasil(0), OriginalArray(0), Dim Decode As Boolean UBound(OriginalArray) + 1) Public CompName(61) As String Dim StTime As Double End Sub Private AutoDecodeIsOn As Boolean 'to Dim Text As String see if autodecode is used Dim LastUsed As Integer 'copy the hasil to the original array so that whe can apply a If UBound(OriginalArray) = 0 Then 'this routine is to initialize the text which can be returned to 'second compress/coder on the file MsgBox "There is nothing to code/Decode"

A-16

Exit Sub Text = "This is not coded with the " End If & CodName(WichCoder) & Chr(13) End If LastDeCoded = Decode If LastUsed = 0 Then If AutoDecodeIsOn = False Then Call Copy_Orig2Work Text = Text & "Its not coded at Decode = True all" If JustLoaded = True Then

frmCodeDecode.Show vbModal Else JustLoaded = False

DoEvents If LastUsed > 128 Then ReDim UsedCodecs(0)

If CompDecomp = 0 Then Exit Sub Text = Text & "Its coded with End If the " & CodName(LastUsed And 127) If CompDecomp = 1 Then Decode = StTime = Timer False Else compression.MousePointer = Else Text = Text & "Its compressed MousePointerConstants.vbHourglass with " & CompName(LastUsed) Decode = True Select Case WichCoder End If End If Case 1 End If If Decode = True Then If Decode = False Then Call MsgBox Text Difference_Coder(hasil) LastUsed = UsedCodecs(UBound(UsedCodecs)) Exit Sub If Decode = True Then Call Difference_DeCoder(hasil) If JustLoaded = True Then LastUsed = End If 0 Case 2 Else If (WichCoder Or 128) <> LastUsed If Decode = False Then Call Then LastCoder = WichCoder Or 128 FrequentShifter_Coder(hasil)

A-17

If Decode = True Then Call If Decode = True Then Call If Decode = True Then Call FrequentShifter_DeCoder(hasil) MTF_DeCoderArray(hasil) ValueDownShifter_DeCoder(hasil)

Case 3 Case 7 Case 11

If Decode = False Then Call If Decode = False Then Call If Decode = False Then Call BWT_CodecArray4(hasil) MTF_CoderArray2(hasil) ValueUpShifter_Coder(hasil)

If Decode = True Then Call If Decode = True Then Call If Decode = True Then Call BWT_DeCodecArray4(hasil) MTF_DeCoderArray2(hasil) ValueUpShifter_Coder(hasil)

Case 4 Case 8 Case 12

If Decode = False Then Call If Decode = False Then Call If Decode = False Then Call Fix128_Coder(hasil) Sort_Swap_Coder(hasil) ValueTwister_Coder(hasil)

If Decode = True Then Call If Decode = True Then Call If Decode = True Then Call Fix128_DeCoder(hasil) Sort_Swap_DeCoder(hasil) ValueTwister_DeCoder(hasil)

Case 5 Case 9 Case 13

If Decode = False Then Call If Decode = False Then Call If Decode = False Then Call FlattenTo64(hasil) Used2Front_Coder(hasil) Fix128B_Coder(hasil)

If Decode = True Then Call If Decode = True Then Call If Decode = True Then Call DeFlattenTo64(hasil) Used2Front_DeCoder(hasil) Fix128B_DeCoder(hasil)

Case 6 Case 10 Case 14

If Decode = False Then Call If Decode = False Then Call If Decode = False Then Call MTF_CoderArray(hasil) ValueDownShifter_Coder(hasil) Seperator_Coder(hasil)

A-18

If Decode = True Then Call If Decode = True Then Call Seperator_DeCoder(hasil) Numerator2_DeCoder(hasil) 'This sub is used to start a compressor Case 15 Case 19 'whichcoder is the constant of the If Decode = False Then Call If Decode = False Then Call compressortype Flatter16_coder(hasil) AddDiffer_Coder(hasil) 'Decode is used to say if we want to If Decode = True Then Call If Decode = True Then Call compress or decompress Flatter16_Decoder(hasil) AddDiffer_DeCoder(hasil) Public Sub Case 16 Case 20 Start_Compressor(WichCompressor)

If Decode = False Then Call If Decode = False Then Call Dim decompress As Boolean Base64Array_Encode(hasil) Scrambler_Coder(hasil) Dim Dummy As Boolean If Decode = True Then Call If Decode = True Then Call Base64Array_Decode(hasil) Scrambler_DeCoder(hasil) Dim StTime As Double

Case 17 End Select Dim Text As String

If Decode = False Then Call compression.MousePointer = Dim LastUsed As Integer Numerator_EnCoder(hasil) MousePointerConstants.vbDefault If UBound(OriginalArray) = 0 Then If Decode = True Then Call If AutoDecodeIsOn = False Then MsgBox "There is nothing to Numerator_DeCoder(hasil) Call Show_Statistics(False, hasil, compress/Decompress" Case 18 Timer - StTime) Exit Sub If Decode = False Then Call End If End If Numerator2_EnCoder(hasil) End Sub If AutoDecodeIsOn = False Then

A-19

decompress = True Else JustLoaded = False

If CompDecomp = 0 Then Exit Sub If LastUsed > 128 Then ReDim UsedCodecs(0)

If CompDecomp = 1 Then decompress Text = Text & "Its coded with End If = False the " & CodName(LastUsed And 127) compression.MousePointer = Else Else MousePointerConstants.vbHourglass

decompress = True Text = Text & "Its compressed StTime = Timer with " & CompName(LastUsed) End If If decompress = False Then Call End If Compress_arithmetic_Dynamic(hasil) If decompress = True Then End If End LastUsed = UsedCodecs(UBound(UsedCodecs)) MsgBox Text compression.MousePointer = MousePointerConstants.vbDefault If JustLoaded = True Then LastUsed = Exit Sub 0 If AutoDecodeIsOn = False Then End If If WichCompressor <> LastUsed Then Call Show_Statistics(False, hasil, Else Timer - StTime) Text = "This is not compressed with " & CompName(WichCompressor) & "." & LastCoder = WichCompressor End If Chr(13) End If End Sub If LastUsed = 0 Then Call Copy_Orig2Work Text = Text & "Its not LastDeCoded = decompress compressed at all" 'this sub is used to load a chosen file If JustLoaded = True Then Public Sub load_File(Name As String)

A-20

Dim FreeNum As Integer 'this sub is used to see if the file just If HeadText <> "UCF" Then Exit Sub loaded is a file which is 'this is an un-UCF'ed file If Name = "" Then Exit Sub 'stored by this programm and is already Version = Chr(ByteArray(InPos)) FreeNum = FreeFile coded/compressed InPos = InPos - 1 Open Name For Binary As #FreeNum Private Sub Split_Header_From_File(ByteArray() As Select Case Version ReDim OriginalArray(0 To Byte) LOF(FreeNum) - 1) Case "0" Dim HeadText As String Get #FreeNum, , OriginalArray() CodecsUsed = ByteArray(InPos) Dim X As Integer Close #FreeNum InPos = InPos - 1 Dim CodecsUsed As Integer JustLoaded = True ReDim UsedCodecs(CodecsUsed) Dim Version As String Call For X = 1 To CodecsUsed Split_Header_From_File(OriginalArray) Dim InPos As Long UsedCodecs(X) = compression.Caption = "loading" & InPos = UBound(ByteArray) ByteArray(InPos) LoadFileName & "" For X = 0 To 2 InPos = InPos - 1 OriginalSize = UBound(OriginalArray) + 1 HeadText = HeadText & Next Chr(ByteArray(InPos)) Call Show_Statistics(True, OriginalArray) ReDim Preserve ByteArray(InPos) InPos = InPos - 1 End Sub End Select Next ReDim hasil(0) JustLoaded = False

A-21

End Sub Dim X As Integer SaveName = ""

If UBound(ByteArray) = 0 Then compression.Cdlg.DialogTitle = "Type in the name you want to save with" 'this sub is used to save a file MsgBox "There is nothing to be saved" compression.Cdlg.FileName = "" 'if the file was coded/compressed the types of coders/compressors used Exit Sub compression.Cdlg.ShowSave

'will be saved with the file so that we can End If SaveName = recall it later compression.Cdlg.FileName If source = False And LastCoder <> 0 Public Sub Save_File_As(ByteArray() As Then Call AddCoder2List(LastCoder) If SaveName = "" Then Byte, source As Boolean) If UBound(UsedCodecs) = 0 And If source = False And LastCoder <> 0 Dim FileNr As Integer UBound(ByteArray) = Then UBound(OriginalArray) Then Dim HeadArray() As Byte ReDim Preserve Answer = MsgBox("The file to save is UsedCodecs(UBound(UsedCodecs) - 1) Dim OutHead As Integer the same as the original file" & Chr(13) & "Still want to save this file", vbYesNo + LastCoder = Dim HeadText As String vbExclamation) UsedCodecs(UBound(UsedCodecs)) Dim Answer As Integer If Answer = vbNo Then End If Dim CodecsUsed As Integer Exit Sub Exit Sub Dim SaveName As String End If End If Dim ExtPos As Integer End If Temp = 0 Dim Temp As Integer Ask_SaveName: Do

A-22

ExtPos = Temp For X = CodecsUsed To 1 Step -1 End If

Temp = InStr(ExtPos + 1, SaveName, HeadArray(OutHead) = Kill SaveName 'first remove it ".") UsedCodecs(X) otherwise size is not adjusted

Loop While Temp <> 0 OutHead = OutHead + 1 End If

If ExtPos = 0 Or ExtPos < Len(SaveName) Next Open SaveName For Binary As #FileNr - 5 Then HeadArray(OutHead) = CodecsUsed Put #FileNr, , ByteArray() SaveName = SaveName & ".hmf" OutHead = OutHead + 1 If CodecsUsed > 0 Then End If For X = Len(HeadText) To 1 Step -1 Put #FileNr, , HeadArray() 'store the header in reversed order at the end of the file HeadArray(OutHead) = End If Asc(Mid(HeadText, X, 1)) HeadText = "UCF0" Close #FileNr OutHead = OutHead + 1 If LastCoder = 0 And source = False Then End Sub Next CodecsUsed = 0 FileNr = FreeFile Else 'this sub is used to show the statistics of a If Dir(SaveName, vbNormal) <> "" Then file CodecsUsed = UBound(UsedCodecs) Answer = MsgBox("File already exists" 'it can display both the original as the hasil End If & Chr(13) & Chr(13) & "Overwrite", vbCritical + vbYesNo) Public Sub Show_Statistics(OrgData As ReDim HeadArray(4 + CodecsUsed) Boolean, Data() As Byte) If Answer = vbNo Then OutHead = 0 Dim StatWindow As Integer GoTo Ask_SaveName

A-23

Dim Frequentie(255) As Long NewSize = NuSize & " Bytes ¬_¬ " & For X = 0 To 255 Format(100 - (OriginalSize - NuSize) / Dim SortFreq(1, 255) As Long OriginalSize * 100, "##0.00") & "% " Counts(Frequentie(X)) = Counts(Frequentie(X)) + 1 Dim Counts() As Long For X = 0 To UBound(Data) Next X Dim X As Long Frequentie(Data(X)) = Frequentie(Data(X)) + 1 ' Convert the counts into offsets. Dim Minval As Long Next next_offset = 0 Dim Maxval As Long Minval = UBound(Data) For X = Maxval To Minval Step -1 Dim next_offset As Long For X = 0 To 255 this_count = Counts(X) Dim this_count As Long If Minval > Frequentie(X) Then Minval Counts(X) = next_offset Dim HeightValue As Double = Frequentie(X) next_offset = next_offset + Dim Entry As String If Maxval < Frequentie(X) Then this_count Maxval = Frequentie(X) Dim NewSize As String Next X Next Dim NuSize As Long ' Place the items in the sorted array. ' Lets use the counting sort to sort them Dim BPB As String For X = 0 To 255 into another array If OrgData = False Then StatWindow = 1 SortFreq(0, Counts(Frequentie(X))) = ' Create the Counts array. Frequentie(X) NuSize = UBound(Data) + 1 ReDim Counts(Minval To Maxval) SortFreq(1, Counts(Frequentie(X))) = BPB = Format(((NuSize * 8) / X OriginalSize), "###0.000") & " bpb" ' Count the items.

A-24

Counts(Frequentie(X)) = On Error GoTo 0 Dim X As Long Counts(Frequentie(X)) + 1 compression.beforeC.Clear Dim Y As Integer Next X For X = 0 To UBound(ByteArray) Step 50 Dim AddText As String compression.Size(StatWindow).Caption = NewSize AddText = String(50, " ") Dim Data As Byte

End Sub For Y = 0 To 49 Dim Text As String

Public Sub Show_Contents(ByteArray() As If X + Y <= UBound(ByteArray) Then X = UBound(dataComp) Byte) Data = ByteArray(X + Y) If X = 0 Then Dim X As Long If Data < 28 Then Text = Chr(1) MsgBox "der is nothing to see Dim Y As Integer Else Text = Chr(Data) because der is no data"

Dim AddText As String Mid(AddText, Y + 1, 1) = Text Exit Sub

Dim Data As Byte End If End If

Dim Text As String Next On Error GoTo 0

X = UBound(ByteArray) compression.beforeC.AddItem compression.afterC.Clear AddText If X = 0 Then For X = 0 To UBound(dataComp) Step 50 Next MsgBox "Ther is nothing to see AddText = String(50, " ") because there is no data" End Sub For Y = 0 To 49 Exit Sub Public Sub afterContent(dataComp() As Byte) If X + Y <= UBound(dataComp) Then End If

A-25

Data = dataComp(X + Y) JustLoaded = False 'having search which type of coder/compressor was used If Data < 28 Then Text = Chr(1) If LastDeCoded = True Then Else Text = Chr(Data) Public Sub Auto_Decode_Depack() If UBound(UsedCodecs) > 0 Then Mid(AddText, Y + 1, 1) = Text Dim X As Integer ReDim Preserve End If UsedCodecs(UBound(UsedCodecs) - 1) Dim CodeNumber As Integer

Next LastCoder = If UBound(OriginalArray) = 0 Then UsedCodecs(UBound(UsedCodecs)) compression.afterC.AddItem MsgBox "There is nothing to AddText End If Decode/Decompress"

Next Exit Sub Exit Sub

End Sub End If End If

ReDim Preserve If UBound(UsedCodecs) = 0 Or UsedCodecs(UBound(UsedCodecs) + 1) JustLoaded = True Then 'this sub is used to store a coder/compressor type into an array UsedCodecs(UBound(UsedCodecs)) = MsgBox "This file was'nt CodeNumber Coded/Compressed" 'so that we can keep up which coders/compressors are used to get to End Sub Exit Sub

'the last file whe have standing in the End If original array 'this sub is used to decode/uncompress CodeNumber = Public Sub AddCoder2List(CodeNumber As automaticly without the user UsedCodecs(UBound(UsedCodecs)) Integer) AutoDecodeIsOn = True

A-26

If CodeNumber > 128 Then Call Show_Statistics(True, OriginalArray) End If

Call Start_Coder(CodeNumber And End Sub If UBound(hasil) = 0 Then 127) MsgBox "There is nothing to compare Else with" 'this sub is used to compare the original Call Start_Compressor(CodeNumber) array with the hasil Exit Sub

End If Public Sub End If Compare_Source_With_Target() Call Copy_Work2Orig FileSize = UBound(OriginalArray) Dim FileSize As Long ReDim hasil(0) If UBound(hasil) <> FileSize Then Dim SameSize As Boolean compression.AscTab(1).Clear SameSize = False Dim Text As String compression.FreqTab(1).Clear If UBound(hasil) < FileSize Then Dim Equal As Boolean compression.FileSize(1).Caption = " " FileSize = UBound(hasil) Dim X As Long AutoDecodeIsOn = False End If SameSize = True If UBound(UsedCodecs) > 0 Then End If Equal = True ReDim Preserve For X = 0 To FileSize UsedCodecs(UBound(UsedCodecs) - 1) If UBound(OriginalArray) = 0 Then If OriginalArray(X) <> hasil(X) Then LastCoder = MsgBox "There is nothing to UsedCodecs(UBound(UsedCodecs)) compare" Equal = False

End If Exit Sub Exit For

A-27

End If MsgBox Text

Next End Sub

If Equal = False Then

Text = "The files are different at position " & X

If SameSize = False Then

Text = Text & Chr(13) & "And They dont have the same size"

End If

MsgBox Text

Exit Sub

End If

If SameSize = False Then

Text = "The files are almost the same except that they don't have the same size"

Else

Text = "the two files are the same"

End If

A-28

LAMPIRAN B ISI FILE UNTUK PERCOBAAN

o 4.3 Body Quoted references can also be helpful. 1. File 1 References to people can also be made through o 4.4 Conclusion written accounts of interviews and debates For Wikipedia guidelines, see Wikipedia:What is confirming the factuality of the writer’s an article. * 5 Characteristics of well-written articles information and the reliability of her source. The writer can use redirection to ensure that the An article is a stand-alone section of a larger * 6 Authorship written work. These nonfictional prose reader keeps reading the article and to draw his attention to other articles. For example, phrases compositions appear in magazines, * 7 Notes newspapers, academic journals, the Internet or like "Continued on page 3” redirect the reader to any other type of publication. * 8 External links a page where the article is continued.

Articles can be divided into two main [edit] News Articles While a good conclusion is an important categories: news and features. Straight news ingredient for newspaper articles, the stories deal with the timeliness and immediacy See also: News style immediacy of a deadline environment means of breaking news, while feature articles are news that copy editing often takes the form of deleting stories that deal with human-interest topics[1] or A news article is an article published in a print everything past an arbitrary point in the story which offer the opportunity for providing more or Internet news medium such as a newspaper, corresponding to the dictates of available space breadth or depth, context of history or other newsletter, news magazine or news-oriented on a page. Therefore, newspaper reporters are explanatory background material. website that discusses current or recent news of trained to write in inverted pyramid style, with all either general interest (i.e. daily newspapers) or the most important information in the first Contents on a specific topic (i.e. political or trade news paragraph or two. If less vital details are pushed magazines, club newsletters, or technology towards the end of the story, the potentially [hide] news websites). destructive impact of draconian copy editing will be minimized. * 1 News Articles A news article can include accounts of eyewitnesses to the happening event. It can [edit] Feature Articles * 2 Feature Articles contain photographs, accounts, statistics, graphs, recollections, interviews, polls, debates See also: Feature writing * 3 Other types of articles on the topic, etc. Headlines can be used to focus the reader’s attention on a particular (or main) Feature articles are nonfiction articles that * 4 Elements of an article part of the article. The writer can also give facts intend to inform, teach or amuse the reader on a and detailed information following answers to topic. The topic centers around human interests. o 4.1 Headline general questions like who, what, when, where, Feature stories may include conventions found why and how. in fiction such as dialogue, plot and character. A o 4.2 Lead feature article is an umbrella term that includes

B-1

many literary structures: personality sketches, Publishing: 1990. ISBN 0844259616, pp. 8, 31, By Laura Ruel and Nora Paul essays, how-to's, interviews and many others.[2] 50, 96-97 The following are examples of feature articles: Posted: 2007-03-13 6. ^ a b Jacobi, Peter, The Magazine Article: * Column — A short newspaper or magazine How to Think It, Plan It, Write It. Writer's Digest When one of world’s best-known usability piece that deals specifically with a particular Books: 1991, ISBN 0898794501, pp. 50-77, 90 experts, Jakob Nielsen, conducts eyetracking field of interest, or broadly with an issue or research to test what his usability work has circumstance of far-reaching scope. They [edit] External links shown, the results generate some beneficial tips appear with bylines on a regular basis (daily, for online editors. This is what happened in late weekly, etc.). They may be written exclusively * How-to Articles 2005, when Nielsen and Kara Pernice Coyne, the for one newspaper or magazine, they may be Nielsen/Norman Group’s director of research, marketed by a syndicate, or they may be self- * How to Write Articles conducted an eyetracking test with 255 people syndicated by the author. in New York City. * How to Write Special Feature Articles * Essay — A short, literary, nonfiction With a little more than half of the participants (63 * Getting Published: Your Article Submission composition (usually prose), in which a writer percent) ages 30 to 49, the test generated Checklist develops a theme or expresses an idea. results applicable to the target audience for most news sites. Additionally, 20 percent were * Article Submission * Evergreen — A timeless article that editors 18-29 and 16 percent were 50-64. Fifty-eight can hold for months and publish when needed. Retrieved from percent were female, 42 percent were male. They need little or no updating.[3] "http://en.wikipedia.org/wiki/Article_%28publishi Every test subject was given 50 tasks to ng%29" complete. Sessions with each test subject lasted * Exposé — These articles use in-depth about one to two hours. reporting with heavy research and Categories: Narrative structures | Writing documentation. Used to expose corruption in business, politics or celebrities. Also called the investigative article.[2][3] 2. File 2 Coyne (who we interviewed for this column) stresses that crucial to understanding the * Filler — Short non-fiction items, usually just Eyetracking points the way to effective news testing results is an awareness of the user’s under 300 words, used to fill in small spaces on article design motivation or goal behind each task. Some of a page of a magazine or newspaper page.[4] the testing scenarios included asking the user OJR's design experts review usability research to "read the news" or "read/learn", making a the number of times that their articles are cited and offer suggestions on how you can make number these results particularly helpful to your online articles better connect with readers. journalists. She said eyetracking is valuable in . these cases because it indicates not only where

B-2

our users look, but where key usability restaurant ranking. (Nielsen/Norman Group June 25 issue of ACS' Journal of Agricultural problems exist. images, used with permission) and Food Chemistry, a bi-weekly publication.

"[With eyetracking] we can see that a user may The eyetracking data is featured in the image In the new study, Toyohiko Ariga and colleagues navigate the page of an interface that houses below. Red areas indicate the areas where the point out that allicin is one of the main active the info she wants," she said, "but if the text is fixation length (or the length of time the users ingredients in garlic. Other studies have shown poorly presented, or the navigation is cluttered, spent look at that area of the screen) was that allicin has beneficial effects in preventing or there are too many superfluous images so longest. Dark areas indicate low or no fixation blood clots, cancer, and bacterial infection. she cannot easily find what she needs. This is a length on that part of the presentation. Although commercially bottled garlic is often lost opportunity." stored in oil or water, researchers did not know Image how various storage and preservation methods We’ve featured three of the more interesting affect levels of allicin, which is fragile and journalistic study results below. Users spent a longer amount of time (about one disappears quickly. minute) viewing the original version of the Featured finding #1: content (left) but remembered 34 percent less To find out, Ariga's group compared allicin than those who received the reformatted story levels in extracts of fresh garlic after 1-2 weeks Rewrite + reformat = remember (right). In both cases a greater amount of time of storage in water, alcohol, and vegetable oil. was spent on the left-hand side of the page. Garlic stored in water at room temperature lost What if you could engage users in a story for (Nielsen/Norman Group images, used with about half its allicin in 6 days and garlic in about half the time, yet have them remember permission) vegetable oil lost half its allicin in less than an about 34 percent more of the content? That’s hour. The garlic lost its antibacterial action as exactly what one test showed. Spending less 3. File 3 allicin broke down. However, allicin broke down than two hours rewriting and reformatting a into materials that still are believed to have story about New York City restaurants really some anticancer and anti-blood clot effects. - paid off according to this study. Love that garlic? Fresh may be healthier than bottled MTS The image below shows the two stories tested: The next time you use garlic for its renowned ARTICLE: "Biological and Chemical Stability of Garlic-Derived Allicin" Image antibacterial effects, consider fresh garlic instead of those bottles of chopped garlic. CONTACT: The original version (left) was revised to Researchers in Japan report that fresh garlic maintains higher levels of a key healthy increase white space, make the main idea Toyohiko Ariga, Ph.D. concise, remove unnecessary images, shorten ingredient than preserved versions and may be lines of text and add a graphic for each better for you. Their study is scheduled for the Nihon University

B-3

Fujisawa, Japan materials including simulants for potentially that interferes with or "silences" genes that hazardous biological, chemical and radiological make disease-causing proteins. The authors Sniffing out a broad-spectrum of airborne materials, as well as actual explosives and explain that RNAi has advantages over other threats in seconds drugs. The study terms SPAMS a "significant gene therapies. It is potent, very specific, and and important advance in rapid aerosol threat appears to have a low risk of side effects. Scientists in California are reporting successful detection." - AD laboratory and field tests of a new device that They cite encouraging results with RNAi in can sniff out the faintest traces of a wide range ARTICLE: "Autonomous, Broad-Spectrum laboratory studies in cells and animals with a of chemical, biological, nuclear, and explosive Detection of Hazardous Aerosols in Seconds" range of lung diseases, including lung cancer, threats - and illicit drugs - from the air in certain respiratory infections and inflammatory minutes with great accuracy. The ultra-sensitive CONTACT: lung disease. Keys to successful therapy in detector, known as the single-particle aerosol humans include careful design of the gene- mass spectrometry (SPAMS) system, could Matthias Frank, Ph.D. silencing agents, determining the most effective tighten security at airports, sports stadiums and doses, and developing better ways of delivering other large-scale facilities, according to their Lawrence Livermore National Laboratory RNAi agents to the lungs, the scientists say. - report, scheduled for the July 1 issue of ACS' MTS Analytical Chemistry, a semi-monthly journal. Livermore, California 94550 ARTICLE: "Inhalable siRNA: Potential as a Inhalable form of gene-therapy takes aim at lung Matthias Frank and colleagues explain that Therapeutic Agent in the Lungs" chemical, biological, nuclear, and explosive cancer and inflammatory lung disease materials, as well as illicit drugs, all release CONTACT: A new inhalable form of gene therapy - based on minute amounts of aerosol particles into the air. technology recognized in the 2006 Nobel Detecting these particles requires a device with Sally-Ann Cryan, Ph.D. medicine prize, shows increasing promise for a high sensitivity, low probability of false treating lung cancer, infectious diseases and alarms, and a fast response time. "SPAMS Royal College of Surgeons in Ireland inflammatory lung disease, scientists have uniquely meets these requirements in realistic concluded after an exhaustive review of field environments," the report states. While Dublin, Ireland worldwide research on the topic. Their report is other aerosol detectors exist, SPAMS is scheduled for the June 2 issue of ACS' Researchers band together in global battle on specifically designed for the rapid detection of Molecular Pharmaceutics, a bi-monthly journal. bacterial biofilms low-concentration aerosols, it adds. In the article, Sally-Ann Cryan, Niamh Durcan, The discovery that bacteria are not loners, but The study describes laboratory tests of SPAMS and Charlotte Murphy focus on research efforts social creatures that congregate and chemically and extended field tests at San Francisco to develop an inhalable form of RNA communicate in communities - termed biofilms - International Airport. It showed that within interference (RNAi), a gene-therapy technique has sparked a global scientific effort to control seconds, SPAMS detected a diverse set of

B-4

spread of these slimy coatings that grow on users around the globe to make the Web more images without alternative text (the text hospital surfaces, inside tubing, and a multitude accessible to the visually impaired. description of an image that usually of other places. That's the topic of an article accompanies it in the HTML code) but there is scheduled for the June 9 issue of Chemical & ADVERTISEMENT no way for me to say 'I want to have a Engineering News, ACS' weekly newsmagazine. description for this image.' It's a simple Many blind or partially sighted users run screen motivation but if we can report this kind of In the C&EN cover story, Senior Editor Lisa M. reading software that describes the content of a problem without difficulty and have it easily Jarvis points that biofilms are the major culprit Web page but often encounter problems. The understood by sighted people I think it's going behind hospital-acquired infections that are now screen readers rely on text or descriptive tags to to be great." the fourth leading cause of death in the United explain the items on a page but these are often States, claiming thousands of lives each year. added as an after thought or are incomplete IBM began offering the software from Tuesday Biofilms also cause other problems ranging as a beta release through its AlphaWorks Web from dental plaque to the biofouling of ship Using the new IBM software users can report site. hulls. The films are large, complex communities these problems to a central database and ask of bacteria that are difficult to kill. for additional descriptive text to be added to a The software for blind or partially sighted users site. Other Internet users that want to contribute runs with Internet Explorer and the "Jaws" But researchers from academia and industry are can then check the database, select one of the screen reader while the software for supporters now collaborating in a global effort to develop submitted problems and "start fixing it" by of the project is available as a plug-in for promising new strategies to combat this added text labels. The additional information Firefox. It runs in English or Japanese. problem. New approaches include the isn't incorporated into the original site's HTML development of non-stick surfaces and the code but into a metadata file that is loaded each Demonstrating the system, Asakawa typed in identification of chemicals that silence bacterial time a visually impaired user subsequently the address for the White House Web site and communication or starve them of key nutrients. visits the site. soon found problems. While the site appears to The first commercial compound to specifically have been designed with accessibility in mind, target biofilms is still a few years away, "This idea came from my own experience with the headings at the top of the three main according to the article. inaccessible Web sites," said Chieko Asakawa, a columns had no data attached that would allow researcher at IBM in Tokyo who led a six-person her screen-reading software to make sense of ARTICLE: "Communal Living" team on development of the software. Asakawa what they were. is blind herself so knows well the problems of navigating the Web and its increasing rich 4. File 4 multimedia pages.

IBM launched on Tuesday an application that "As users we face a lot of problems everyday seeks to harness the power and time of Internet but currently we don't have any mechanism to 5. File 5 report what we have found. Every day we find

B-5

#include for ( ; r>0 ; r-- ) { for ( u=1 ; ( (u<=mGolomb) && (c=getc(fp)) != EOF ) ; u++ ) { #include printf("0\n"); if( c == '1' ) { r++ ; } #include } if ( u < mGolomb ) { r = r * 2 ; } #include "Gdefns.h" } } // uncompressor (Golomb) for sparse file. int main( int argc , char *argv[] ){ printzeroes(r, &needtoprint1); // Ideally we // usage: GolombDecode < file.GZ > file.decoded FILE *fp; should print a "1" immediately, but

// (c) David J.C. MacKay int r , u , needtoprint1 = 0 ; // instead we postpone this printing event and make a note that we need to do it later; // License: GPL // unsigned char c ; http://www.gnu.org/copyleft/gpl.html // this is an ugly hack to cope with the "add a int c ; virtual trailing 1" behaviour of the encoder. // Originates from: http://www.inference.phy.cam.ac.uk/mackay/itpr fp=stdin; // The final "1" does not get printed. nn/code/c/compress/ r = 0 ; needtoprint1 = 1; void printzeroes( int , int * ) ; while( (c=getc(fp)) != EOF ) { } else { // prints a string of r zeroes, PRECEDED by "1" if the second flag is set. if( c == '1' ) { // carriage returns void printzeroes( int r , int *needtoprint1 ) { printzeroes(MGolomb, &needtoprint1 ); }

if ( *needtoprint1 ) { r = 0 ; }

printf("1\n"); } else if (c=='0') { return(0);

*needtoprint1 = 0 ; // read in the next m bits as an integer }

} r=0;

B-6

6. File 6 /* This defines my current location. */ at('light switch', bedroom).

"Sleepy" -- A Sample Adventure Game in Prolog /* These facts specify some game-specific information. */ David Matuszek, Villanova University i_am_at(bedroom). alive(fly). You are welcome to use any and all parts of this program in your own adventure game. lit(bedroom). /* These facts describe how the rooms are /* "Sleepy" -- a sample adventure game, by connected. */ lit(den). David Matuszek. */ path(bedroom, n, den) :- lit(bedroom). visible_object('light switch'). /* In standard Prolog, all predicates are "dynamic": they path(bedroom, n, den) :- /* These rules describe how to pick up an object. */ can be changed during execution. SWI-Prolog write('You trip over something in the requires such dark.'), nl, take(fly) :-

predicates to be specially marked. */ !, fail. write('It''s too fast for you!'), nl,

:- dynamic at/2, i_am_at/1, i_am_holding/1, path(den, s, bedroom). !, fail. alive/1, path(bedroom, d, bed). take('light switch') :- lit/1, visible_object/1. path(bed, u, bedroom). take(switch). /* This routine is purely for debugging purposes. */ /* These facts tell where the various objects in take(switch) :- the game dump :- listing(at), listing(i_am_at), write('It''s firmly embedded in the listing(i_am_holding), are located. */ wall!'), nl,

listing(alive), listing(lit), at(flyswatter, den). !, fail. listing(visible_object). at(fly, bedroom). take(X) :-

at('light switch', den). i_am_holding(X),

B-7

write('You''re already holding it!'), write('OK.'), wanita tua yang sengaja menghadang. Karena terhalang, nenek tua itu menghindar, tapi selalu nl. nl. dihadang, sehingga membuat keduanya berdiri berhadapan, dan saat itu, si nenek yang akan take(X) :- drop(_) :- berziarah ke gunung itu betanya, “Saya datang untuk memberi penghormatan kepada Dewi i_am_at(Place), write('You aren''t holding it!'), Kwan-im, kamu akan berdosa jika menghalangi jalan saya.” at(X, Place), nl. Si wanita tua yang menghadang jalan itu retract(at(X, Place)), /* These rules define the six direction letters as berkata, “Tiap hari merindukan saya, memuja calls to go/1. */ assert(i_am_holding(X)), saya, dan bertemu dengan saya lalu tidak kenal n :- go(n). saya lagi.” Dalam hati si nenek tua itu berpikir: write('OK.'), “Kamu perempuan tua yang sama sepertiku, s :- go(s). saya memang rindu, dan memuja Dewi Kwan-im, nl. mengapa harus merindukan dan memujamu?” e :- go(e). Begitu ia merenung, lantas tidak tahu ke mana take(_) :- perginya si wanita tua yang menghadangnya itu, w :- go(w). bayangannya sudah lenyap dan tak kelihatan write('I don''t see it here.'), lagi. Ia lalu mengingat kembali kata-kata itu: u :- go(u). “Tiap hari merindukan saya, memuja saya, dan nl. bertemu dengan saya lalu tidak kenal lagi, ya d :- go(d). Tuhan, tadi adalah penjelmaan Dewi Kwan-im, /* These rules describe how to put down an melihat tapi tak kenal.” Saat itu, ia berlutut dan object. */ 7. File 7 menangis sedih, melewatkan kesempatan dan nasib, bertemu tapi tidak berjodoh. drop(X) :- (erabaru.or.id) Pada jaman dahulu, seorang nenek tua menganut kepercayaan pada Dewi Sebagian besar orang di dunia sekarang ini i_am_holding(X), Kwan-im, ia selalu membaca kitab suci dan seperti anak kecil yang kebingungan, tersesat, i_am_at(Place), menyembahyangi Dewi Kwan-im. Suatu ketika ia mengembara ke mana-mana, menangis dan pergi ke gunung Ku Tuo, daerah Zhejiang, berteriak mencari sang ibu. Buddha utama retract(i_am_holding(X)), memberi penghormatan kepada Dewi Kwan-im. persis bagaikan ibunda yang bijak, demi anak- Ketika si nenek tua berjalan ke Qian Busha anaknya yang hilang entah kemana, sang ibu assert(at(X, Place)), untuk berziarah, dihadapannya datang seorang terus mencari ke mana-mama, dari tempat yang

B-8

sangat… sangat jauh, mendaki gunung dan nvcmvmadahfsjdkglkgl[pu[yutyrreq21243547665 sehingga waktu pengirimannya lama. Begitu menyeberangi sungai, mengalami berbagai 676099 juga dengan penyimpanan data, arsip yang macam kesulitan dan penderitaan mencari anak berukuran besar membutuhkan ruang kandung sendiri. Namun ketika bertemu, anak- 9. File 9 penyimpanan yang besar. Kedua masalah ini anaknya tidak ingat lagi secara jelas senyuman dapat diatasi dengan mengkodekan pesan atau kasih sang ibu, juga tidak kenal lagi siapa sang Departemen Teknik Informatika isi arsip sesingkat mungkin, sehingga waktu ibu itu. Anak-anak itu lantas mendengar dan pengiriman pesan relatif cepat dan ruang percaya dengan hasutan kejahatan, Institut Teknologi Bandung penyimpanan yang dibutuhkan juga sedikit. menganggap ibunda yang paling bijak sebagai Cara pengkodean seperti ini disebut kompresi orang jahat yang paling mengerikan di dunia, Tugas I IF2251 Strategi Algoritmik (pemampatan) data dan pemulihan data tersebut juga bersekongkol dengan kejahatan kembali seperti aslinya disebut dekompresi. menganggapnya sebagai musuh, menodai dan Kompresi dan Dekompresi File dengan Salah satu cara kompresi dan dekompresi data memfitnah ibunda yang belas kasih. ini adalah dengan menggunakan kode Huffman. Kode Huffman (Aplikasi Algoritma Greedy) Setiap hari penganut Buddha memohon Pada tugas pertama Strategi Algoritmik penyelamatan, berharap Buddha menetap di Batas pengumpulan : 12 Maret 2004 ini, anda diminta mengimplementasikan kode dunia, tidak tahu sudah berapa kehidupan Huffman dalam kompresi dan dekompresi data. Tempat pengumpulan : - Laporan : Loker tujuh memohon, berharap Maitreya turun ke dunia Kode Huffman dibangkitkan dengan algoritma Lab IRK manusia menyelamatkan mereka. Kini, “Buddha Huffman. Algoritma Huffman menggunakan Utama” yang sesungguhnya turun ke dunia, - Source dan Exe : - email prinsip greedy dalam pembentukan kode namun kita malah ditipu oleh dusta-dusta jahat, [email protected] Huffman. Anda harus dapat mengompresi juga secara besar-besaran mengikuti iblis semua jenis data baik berupa teks, gambar, memfitnah dan mencemari, oh…. betapa - email suara, dan dan Anda harus mampu cerobohnya! Kalau begitu, bagaimana anak- [email protected] mengembalikan data yang sudah dikompres anak itu bisa kembali kepangkuan ibunya. tersebut ke bentuk asalnya (dekompresi). Arsip pengumpulan : - Source dan Exe program Sebagai contoh, jika executable file (Sumber: Dajiyuan) disertai readme.txt dimampatkan (misalnya notepad.exe), maka program notepade.exe tersebut harus dapat 8. File 8 - Laporan dijalankan kembali hhththtrhrthtrhrthbmnmnxcb,nzxbv,mvksjewE:g' Deskripsi tugas : Program yang Anda buat selain b.df'bSFFJHSDHSGFKDJKJhh%%%%%%%%% mampu mengompresi dan mendekompresi data %%&&&&&&^$$%$%^$^$%^%^^546yzczczcbcx Dalam komunikasi data, pesan yang harus dapat menunjukkan perubahan hasil dikirim seringkali ukurannya sangat besar kompresi tersebut melalui rasio

B-9

pemampatannya. Rasio pemampatan dhitung 2. Anda harus membuat file contoh yang 9. Demo program akan dilaksanakan dengan rumus: belum dikompres dan file yang sudah tanggal 13 Maret yaitu hari Sabtu kecuali ada dikompres. pemberitahuan lebih lanjut dari asisten. P = Ukuran file hasil pemampatan/Ukuran file sebelum dimampatkan 3. Program ini harus Anda buat dalam 10. Urutan demo adalah First Come First ? 100% format GUI, boleh menggunakan Visual C, Serve dari pengumpulan program. Borland C++ Bulider, Delphi, atau VB, namun Yang berarti ukuran file menjadi P (dalam tidak dianjurkan Java (karena beda orientasi). 11. Tiap anggota harus memahami proses persentase) dari ukuran semula. pembuatan program, karena akan ada 4. Tugas dikerjakan per kelompok dengan pertanyaan-pertanyaan yang harus dijawab per Spesifikasi program : jumlah anggota tiga orang. individu.

1. Program mampu mengkompresi data 5. Program harus modular dan 12. Pada saat demo, asisten akan berjenis apapun secara tepat dan benar. mengandung komentar yang jelas. memanggil per kelompok. Kelompok yang tidak berkepentingan dilarang masuk. Demo 2. Program mampu mendekompresi data 6. Pengumpulan adalah tanggal 12 Maret dilakukan di Lab IRK tepat pukul 09.00. yang sebelumnya telah dikompres dengan tepat 2004. Untuk laporan dapat dimasukkan ke dalam dan benar. loker nomor tujuh (7) Lab IRK sebelum pukul Isi laporan : 17.00 WIB 12 Maret 2004. Sedangkan source dan 3. Program mampu memberikan rasio executable program, dapat dikirim melalui email 1. Deskripsi masalah dan dasar teori kompresi data. ke asisten hingga pukul 23.59.59 12 Maret 2004 (maksimum satu halaman). waktu semeru. Keterlambatan akan mengurangi 4. Program juga harus mampu nilai. 2. Strategi penyelesaian masalah. memberikan waktu proses kompresi dan dekompresi data. 7. Source, exe, dan readme.txt disimpan 3. Struktur data dan spesifikasi program. dalam folder StrAlgo1-xxxxx. Lima digit terakhir 5. Program harus mampu menampilkan adalah NIM anggota terkecil. Hal ini berlaku juga 4. Analisis hasil (hasil uji terhadap proses kompresi dan dekompresi tersebut sebagai subjek pengiriman. Readme.txt berisi beberapa jenis file dari berbagai ukuran, baik (misal dalam progress bar). anggota kelompok, NIM, dan keterangan lain dari segi rasio kompresi, waktu kompresi, dan yang dianggap perlu. waktu dekompresi). Lain – lain : 8. Semua pertanyaan menyangkut tugas 5. Kesimpulan dan saran. 1. Anda dapat menambahkan feature- ini harus dikomunikasikan melalui milis agar feature lain yang menunjang program yang anda 6. Referensi. dapat dicermati oleh semua peserta kuliah buat (unsur kreatifitas). IF2251.

B-10

Keterangan laporan : IV. Tujuan VII. Metodologi

1. Laporan ditulis dalam bahasa Dalam tugas akhir ini, penyusun akan 1. Mempelajari referensi tentang Indonesia yang baik dan benar, tidak perlu mengimplementasikan kompresi citra kompresi data khususnya dengan algoritma panjang tetapi tepat sasaran dan jelas. menggunakan algoritma Elias Gamma Coding Elias Gamma Coding kemudian melakukan dekompresi pada citra 2. Laporan tidak perlu memakai cover serta mencari rasio algoritma tersebut dalam 2. Perancangan program mika dan dijilid. Cukup dibuat agar laporan tidak pengkompresian data. akan tercecer bila dibaca. 3. Pembuatan program V. Pembatasan Masalah 3. Laporan boleh menggunakan kertas 4. Pengujian program rius, boleh bolak-balik, boleh dalam satu 1. Implementasi kompresi dalam bentuk halaman kertas terdapat dua halaman tulisan program 5. Analisis data asalkan masih terbaca. 2. Jenis kompresi adalah lossy 6. Pembuatan laporan 4. Identitas per halaman harus jelas compression (misalnya : halaman, kode kuliah). VIII. Diagram blok 3. Media yang dikompresi berupa sebuah Penilaian : image IX. Daftar Pustaka

• Bagaimana cara kerja kompresi dan 4. Kompresi dilakukan secara offline Bell, Timothy C., Alistair Moffat & Ian H. Witten. dekompresi citra? Departments of Computer Science,University of 5. Algoritma yang digunakan adalah Calgary, Canada, and University of Waikato, • Bagaimana mengimplementasi algoritma elias gamma coding New Zealand, [email protected]. kompresi pada citra? 6. Melakukan dekompresi Gonzales, Rafael C.1977. Digital Image • Bagaimana mengimplementasi Processing. Addison- Wesley Publishing dekompresi pada citra? VI. Spesifikasi Program Company.

III. Perumusan Masalah Program untuk implementasi kompesi data Nelson, Mark. 1996. The menggunakan algoritma Elias Gamma Coding Book 2nd-ed. BPB Publications. Perumusan masalah yang dibahas adalah dapat bermacam- macam seperti: C++, Microsoft kompresi dan dekompresi pada citra dengan Visual Basic, Matlab, Delphi. Saat ini penyusun Jain, Anil K. 1989. Fundamentals of Digital menggunakan algoritma Elias Gamma Coding. sedang mengkaji program yang akan digunakan. Image Processing. Prentice-Hall.

B-11

Darmawan, Aan. Maret 2007. Diktat Kuliah untuk parameter itu dapat dihitung atau demikian, satu algoritma yang adaptip itu Pengolahan Citra Dijital. diperkirakan (lihat, sebagai contoh, Bagian 422). bervariasi seribu menurut input-so-far itu adalah Pertama masuk menghitung Golomb pilihan terbaik. Algoritma seperti itu, yang disebut Goladap [Langdon 83a], digambarkan di Memecahkan kode. Golomb mengkode kode dari bilangan bulat taknegatif n untuk sini. dirancang di dalam cara khusus ini untuk menghitung ke tiga jumlah q (kuosien), memudahkan mereka pengawasandian. Kita Mereka membuktikan bahwa kode Golomb pertama menunjukkan pengawasandian untuk r (-sisa), dan c oleh adalah awalan terbaik mengkode ketika seribu seribu kasus yang sederhana = 16 (seribu terpilih oleh mereka ketidaksamaan. Kita adalah suatu daya dari 2). Untuk memecahkan q =n m, r= n -qm, dan c =log2m, pertanda pertama bahwa karena suatu yang kode, mulai pada yang ditinggalkan akhir dari diberi p, ketidaksamaan (23) hanya mempunyai kode dan menghitung nomor A dari 1's berikut yang mana kode dibangun dalam dua satu solusi m. Kita mengolah ketidaksamaan ini terdahulu terlebih dulu 0.Panjang kode itu suku cadang; pertama adalah nilai dari q, coded dalam empat langkah-langkah sebagai berikut: adalah A + c +1 pahat (untuk seribu =16, ini di dalam unary (Berlatih 23), dan yang kedua adalah A +5 pahat). Jika kita menandakan adalah nilai yang biner r coded di suatu cara Tiga contoh diperkenalkan di sini untuk rightmost lima pahat dari kode oleh R, lalu nilai yang khusus.2c pertama -nilai-nilai seribu dari r menggambarkan penampilan dari Golomb dari kode itu adalah 16A + R.Pengawasandian bersifat coded, sebagai integer-integer yang mengkode sederhana ini mencerminkan cara kode tidak ditandatangani, di c -1 pahat masing- dibangun. Untuk menyandi n dengan seribu =16, masing dan sisanya bersifat coded di c di dalam memampatkan menjalankan mulai dengan itu pembagian oleh 16 untuk menggigit masing-masing (berakhir dengan c panjangnya-panjangnya. Contoh yang pertama mendapat n = 16A +R, lalu menulis A 1's diikuti yang paling besar menggigit nomor, yang terdiri adalah dawai yang biner (21), yang mempunyai oleh suatu kosong, yang diikuti oleh matriks S dari c 1's). Kasus di mana seribu adalah suatu 41 4-bit R. daya dari 2 ( m =2c) khusus karena itu memerlukan tidak ( c -1)-bit kode. Kita nol dan 18 mereka. Kemungkinan suatu kosong Menyandi. Golomb mengkode karena bilangan mengetahui bahwa n = r +qm; maka sekali se kemudian 41/(41 + 18) ˜07, hasil?penyerahan bulat taknegatif n bergantung pada pilihan dari kode Golomb dikodekan, nilai-nilai dari q dan r suatu parameter m (we akan melihat dapat digunakan untuk dengan mudah m = -bukukan 17/ batang kayu 07 = 1487 = kemudiannya bahwa untuk RLE, seribu perlu merekonstruksi n. 2.Urutan dari menjalankan panjangnya- bergantung pada kemungkinan p dan di angka panjangnya 5, 2, 0, 3, 1, 6, 0, 0, median dari menjalankan panjangnya- Ada juga kasus umum di mana p tidak dikenal 1, 3, 5, 3, 2, 3, 0, 1, 4, dan 2 kaleng oleh karena panjangnya). Jadi; Dengan demikian, [ini] dan tidak bisa dihitung (atau bahkan itu disandikan dengan Golomb mengkode untuk merupakan suatu kode awalan yang diperkirakan) terlebih dahulu, karena dawai itu seribu =2 parametrized, yang buat nya terutama adalah sangat panjang atau karena itu harus bermanfaat jika di mana nilai-nilai yang baik dimampatkan di dalam waktu nyata selagi itu tiba dari sumber nya. Dalam kasus yang ke dalam dawai dari 18 mengkode

B-12

Banyak metoda kompresi didasarkan pada awalan yang parametrized mengkode. Golomb denoted at: "$." Statistics can be applied to menjalankan pengkodean panjangnya (RLE). mengkode digambarkan di sini [Golomb 66] such n-grams to estimate a likelihood that a Bayangkan a dawai biner di mana suatu kosong adalah seperti itu kode dan mereka adalah yang user intended a particular input. muncul dengan kemungkinan p dan yang terbaik untuk kompresi data item yang dibagi- muncul dengan kemungkinan 1-p. Jika p besar, bagikan secara geometris. Though a billion words of text used to be akan ada berlari tentang kosong-kosong, considered large, training sets for speech mengusulkan pemakaian RLE untuk COMPRESSING LANGUAGE MODELS WITH recognition routinely train on ten billion words memampatkan dawai. Kemungkinan suatu lari of text. In general, large language models work dari n kosong-kosong adalah pn dan well (meaning they have low entropy) ; however, kemungkinan suatu lari dari n nol yang diikuti BACKGROUND The discussion below is merely memory capacity is often limited, especially in oleh suatu 1 adalah pn(1 -p), menunjukkan provided for general background information mobile devices such as cell phones, personal bahwa menjalankan panjangnya-panjangnya and is not intended to be used as an aid in digital assistants (PDAs), electronic planners, dibagi-bagikan secara geometris. determining the scope of the claimed subject and the like. One technique for addressing the matter. memory situation involves trimming the Suatu pendekatan yang naif kepada language model, by removing infrequently used memampatkan dawai seperti itu untuk Language models are used in a variety of words and uncommon variants. However, menghitung kemungkinan dari tiap menjalankan applications including noisy channel removal of such terms reduces the overall panjangnya dan menerapkan metoda Huffman applications such as natural language effectiveness of the language model, leading to (Bagian 28) untuk memperoleh awalan terbaik processing, spell checking, and the like. In more semantic errors due to inability to match mengkode karena menjalankan panjangnya- natural language applications, a speech input to words in the trimmed model . panjangnya. Dalam praktek, bagaimanapun, recognizer typically works by combining mungkin ada sejumlah besar menjalankan acoustic evidence (channel model) with SUMMARY panjangnya-panjangnya expectations about what the user is likely to say (language model) . One common form of This summary is provided to introduce in a dan nomor ini tidak akan dikenal terlebih language models is referred to as a tri-gram. simplified form some concepts, which are dahulu. Suatu pendekatan yang lebih baik untuk described below in the Detailed Description. membangun satu keluarga yang tanpa batas In general, a n-gram is a subsequence of n This Summary is not intended to identify key dari awalan optimal mengkode, seperti bahwa tokens features or essential features of the claimed tak peduli bagaimana merindukan suatu lari subject matter, nor is it intended to be used as adalah, di sana akan merupakan suatu kode di (words) . A tri-gram is a subsequence of 3 an aid in determining the scope of the claimed dalam keluarga itu untuk menyandi nya. tokens. For example, from the phrase "to be or subject matter. Mengkode di dalam keluarga itu harus not to be", 8 tri-grams can be generated: "$ $ bergantung pada kemungkinan p, jadi kita to", "$ to be", "to be or", "be or not", "or not to", In one embodiment, a language model is sedang mencari satu himpunan takhingga dari "not to be," "to be $" and "be $ $," where the compressed using Golomb encoding techniques input string is padded with two special tokens . A list of values is generated from elements of

B-13

the language model. The list of integer values is - Algoritma Edmonds-Karp : implementation of - Algoritma Pencarian A Bintang : kasus khusus sorted, and for each element, a difference Ford-Fulkerson dari pencarian best-first between adjacent integer values in the list is calculated. Each calculated difference is - Nonblocking Minimal Spanning Switch say, for - Pencarian Interpolasi : pencarian mirip biner encoded using a Golomb code. a telephone exchange dengan faktor pada magnitudo (matematika) dari syarat pencarian terhadap nilai atas dan bawah In another embodiment, a system for processing - Spring based algorithm : algorithm for graph dalam pencarian. Kadang-kadang disebut user inputs has a user interface, a memory, a drawing pencarian kamus atau pencarian interpolasi. Golomb encoder/decoder, and a processor. The user interface is adapted to receive user inputs . - Topological sorting - Tabel Hash : mencari sebuah item dalam The memory is adapted to store information and sebuah kumpulan tak berurut dalam waktu O(1). to store a Golomb compressed language model. - Algoritma Hungaria : algorithm for finding a The Golomb encoder/decoder is adapted to perfect matching String algorithms encode user input and to decode elements of Algoritma pencarian the Golomb compressed language model. The String searching algorithm processor is adapted to compare encoded user - Pencarian linear : mencari sebuah item pada input against elements of the Golomb sebuah list tak berurut compressed language model to identify - Algoritma Aho-Corasick probable matches . - Algoritma seleksi : mencari item ke-k pada sebuah list - Algoritma Bitap In another embodiment, a method of decoding user inputs using a Golomb-encoded language - Pencarian biner : menemukan sebuah item - Boyer-Moore string search algorithm model is provided. A user input is divided into a pada sebuah list terurut plurality of- elements, each of which is encoded - Knuth-Morris-Pratt algorithm using a hash technique. Each encoded element - Pohon Pencarian Biner is compared to elements of a Golomb-encoded - Rabin-Karp string search algorithm language model to identify possible matches. - Pencarian Breadth-first : menelusuri sebuah graf tingkatan demi tingkatan Approximate matching - Algoritma Boruvka : finds a minimum spanning tree for a graph - Pencarian Depth-first : menelusuri sebuah graf cabang demi cabang - Algoritma Ford-Fulkerson : computes the - Levenshtein_distance maximum flow problem in a graph - Pencarian Best-first : menelusuri sebuah graf dengan urutan sesuai kepentingan dengan Algoritma penyusunan menggunakan antrian prioritas

B-14

second list.; then sort the two lists. Often the - LZ77 (algorithm) : LZ77 and LZ78 are the method of choice names for the two lossless data compression - Binary search tree algorithms - Radix sort : sorts strings letter by letter - Bogosort - LZMA : short for Lempel-Ziv-Markov chain- - Selection sort : pick the smallest of the Algorithm - Bubble sort : for each pair of indices, swap the remaining elements, add it to the end of the items if out of order sorted list - LZO : data compression algorithm that is focused on speed - Bucket sort - Shell sort : an attempt to improve insertion sort - PPM compression algorithm - Comb sort - Smoothsort - Shannon-Fano coding - Cocktail sort - Stupid sort - Truncated binary encoding - Counting sort - Topological sorting - Run-length encoding : lossless data - Gnome sort Data compression compression taking advantage of strings of repeated characters - Heapsort : convert the list into a heap, keep :Category: algorithms removing the largest element from the heap and - SEQUITUR algorithm : lossless compression adding it to the end of the list - Burrows-Wheeler transform : preprocessing by incremental grammar inference on a string useful for improving lossless compression - Insertion sort : determine where the current - Embedded Zerotree Wavelet item belongs in the list of sorted ones, and - (algorithm) : lossless data insert it there compression - : coding scheme that assigns codes to symbols so as to match code - Merge sort : sort the first and second half of - : aid to compression of data in lengths with the probabilities of the symbols the list separately, then merge the sorted lists which sequential data occurs frequently - : simple lossless - Pancake sorting - Incremental encoding : delta encoding applied compression taking advantage of relative to sequences of strings character frequencies - Pigeonhole sort - LZW : lossless data compression (Lempel-Ziv- - : adaptive coding - Quicksort : divide list into two, with all items Welch) technique based on Huffman coding on the first list coming before all items on the

B-15

- : advanced entropy coding - A-law algorithm : standard - Bresenham's line algorithm : plots points of a algorithm 2-dimensional array to form a straight line - : data compression method between 2 specified points (uses decision that is believed to approach the compression - Mu-law algorithm : standard analog signal variables) ratio of arithmetic coding compression or companding algorithm - DDA line algorithm : plots points of a 2- - Entropy encoding - : method used to dimensional array to form a straight line compress images using fractals between 2 specified points (uses floating-point - : code that represents a number math) n with n ones followed by a zero - : type of data compression for "natural" data like audio signals or - Flood fill : fills a connected region of a multi- - Elias Elias delta coding | Elias gamma coding photographic images dimensional array with a specified symbol | Elias omega coding coding: universal code encoding the positive integers - Vector quantization : technique often used in - Painter's algorithm : detects visible parts of a lossy data compression 3-dimensional scenery - : universal code which encodes positive integers into binary code - Wavelet compression : form of data - Ray tracing : realistic image rendering words compression well suited for (computer graphics) (sometimes also video compression and audio - Golomb coding : form of entropy coding that compression) Algoritma Kriptografi is optimal for alphabets following geometric distributions Computational geometry Lihat juga Topik dalam kriptografi

- Rice coding : form of entropy coding that is - Gift wrapping algorithm : determining the - symmetric key algorithm : optimal for alphabets following geometric convex hull of a set of points distributions - Advanced Encryption Standard (AES), winner - Graham scan determining the convex hull of a of NIST competition :Category: algorithms set of points in the plane - Blowfish (cipher) - Point in polygon : tests whether a given point lies within a given polygon - Data Encryption Standard (DES), sometimes - : lossy compression DE Algorithm, winner of NBS selection by representing the spectral envelope of a Grafik komputer competition, replaced by AES for most purposes digital signal of speech in compressed form - International Data Encryption Algorithm

B-16

- RC4 (cipher) - Other Deskripsi tugas :

- Asymmetric key algorithm or digital signature : - Diffie-Hellman : key exchange Dalam komunikasi data, pesan yang dikirim seringkali ukurannya sangat besar - Digital Signature Algorithm Algoritma Distributed systems sehingga waktu pengirimannya lama. Begitu juga dengan penyimpanan data, arsip yang - ElGamal encryption berukuran besar membutuhkan ruang penyimpanan yang besar. Kedua masalah ini - RSA - File 10 dapat diatasi dengan mengkodekan pesan atau isi arsip sesingkat mungkin, sehingga waktu - Diffie-Hellman key exchange Departemen Teknik Informatika pengiriman pesan relatif cepat dan ruang - NTRUEncrypt penyimpanan yang dibutuhkan juga sedikit. Institut Teknologi Bandung Cara pengkodean seperti ini disebut kompresi - Cryptographic Message digest functions: (pemampatan) data dan pemulihan data tersebut Tugas I IF2251 Strategi Algoritmik kembali seperti aslinya disebut dekompresi. - MD5 – Note that there is now a method of Salah satu cara kompresi dan dekompresi data generating collisions for MD5 Kompresi dan Dekompresi File dengan ini adalah dengan menggunakan kode Huffman.

- RIPEMD-160 Kode Huffman (Aplikasi Algoritma Greedy) Pada tugas pertama Strategi Algoritmik ini, anda diminta mengimplementasikan kode - SHA-1 Batas pengumpulan : 12 Maret 2004 Huffman dalam kompresi dan dekompresi data. Kode Huffman dibangkitkan dengan algoritma Tempat pengumpulan : - Laporan : Loker tujuh - keyed-hash message authentication code : Huffman. Algoritma Huffman menggunakan Lab IRK keyed-hash message authentication prinsip greedy dalam pembentukan kode Huffman. Anda harus dapat mengompresi - Cryptographically secure pseudo-random - Source dan Exe : - email [email protected] semua jenis data baik berupa teks, gambar, number generator s suara, dan video dan Anda harus mampu mengembalikan data yang sudah dikompres - Blum Blum Shub - based on the hardness of - email [email protected] tersebut ke bentuk asalnya (dekompresi). integer factorization Sebagai contoh, jika executable file dimampatkan (misalnya notepad.exe), maka - Yarrow algorithm Arsip pengumpulan : - Source dan Exe program disertai readme.txt program notepade.exe tersebut harus dapat - Fortuna (PRNG) , allegedly an improvement dijalankan kembali on Yarrow - Laporan

B-17

Program yang Anda buat selain 1. Anda dapat menambahkan feature- 8. Semua pertanyaan menyangkut tugas mampu mengompresi dan mendekompresi data feature lain yang menunjang program yang anda ini harus dikomunikasikan melalui milis agar harus dapat menunjukkan perubahan hasil buat (unsur kreatifitas). dapat dicermati oleh semua peserta kuliah kompresi tersebut melalui rasio IF2251. pemampatannya. Rasio pemampatan dhitung 2. Anda harus membuat file contoh yang dengan rumus: belum dikompres dan file yang sudah 9. Demo program akan dilaksanakan dikompres. tanggal 13 Maret yaitu hari Sabtu kecuali ada P = Ukuran file hasil pemberitahuan lebih lanjut dari asisten. pemampatan/Ukuran file sebelum dimampatkan 3. Program ini harus Anda buat dalam ? 100% format GUI, boleh menggunakan Visual C, 10. Urutan demo adalah First Come First Borland C++ Bulider, Delphi, atau VB, namun Serve dari pengumpulan program. Yang berarti ukuran file menjadi P (dalam tidak dianjurkan Java (karena beda orientasi). persentase) dari ukuran semula. 11. Tiap anggota harus memahami proses 4. Tugas dikerjakan per kelompok dengan pembuatan program, karena akan ada Spesifikasi program : jumlah anggota tiga orang. pertanyaan-pertanyaan yang harus dijawab per individu. 1. Program mampu mengkompresi data 5. Program harus modular dan berjenis apapun secara tepat dan benar. mengandung komentar yang jelas. 12. Pada saat demo, asisten akan memanggil per kelompok. Kelompok yang tidak 2. Program mampu mendekompresi data 6. Pengumpulan adalah tanggal 12 Maret berkepentingan dilarang masuk. Demo yang sebelumnya telah dikompres dengan tepat 2004. Untuk laporan dapat dimasukkan ke dalam dilakukan di Lab IRK tepat pukul 09.00. dan benar. loker nomor tujuh (7) Lab IRK sebelum pukul 17.00 WIB 12 Maret 2004. Sedangkan source dan Isi laporan : 3. Program mampu memberikan rasio executable program, dapat dikirim melalui email kompresi data. ke asisten hingga pukul 23.59.59 12 Maret 2004 1. Deskripsi masalah dan dasar teori waktu semeru. Keterlambatan akan mengurangi (maksimum satu halaman). 4. Program juga harus mampu nilai. memberikan waktu proses kompresi dan 2. Strategi penyelesaian masalah. dekompresi data. 7. Source, exe, dan readme.txt disimpan dalam folder StrAlgo1-xxxxx. Lima digit terakhir 3. Struktur data dan spesifikasi program. 5. Program harus mampu menampilkan adalah NIM anggota terkecil. Hal ini berlaku juga proses kompresi dan dekompresi tersebut sebagai subjek pengiriman. Readme.txt berisi 4. Analisis hasil (hasil uji terhadap (misal dalam progress bar). anggota kelompok, NIM, dan keterangan lain beberapa jenis file dari berbagai ukuran, baik yang dianggap perlu. dari segi rasio kompresi, waktu kompresi, dan Lain – lain : waktu dekompresi).

B-18

5. Kesimpulan dan saran. -selamat mengerjakan- kode dari bilangan bulat taknegatif n untuk menghitung ke tiga jumlah q (kuosien), 6. Referensi. PROPOSAL PENGAJUAN TUGAS AKHIR r (-sisa), dan c oleh Keterangan laporan : Kompresi Data dengan Algoritma Elias Gamma Coding q =n m, r= n -qm, dan c =log2m, 1. Laporan ditulis dalam bahasa Indonesia yang baik dan benar, tidak perlu Pembimbing: berikut yang mana kode dibangun dalam dua panjang tetapi tepat sasaran dan jelas. suku cadang; pertama adalah nilai dari q, coded I. Latar belakang di dalam unary (Berlatih 23), dan yang kedua 2. Laporan tidak perlu memakai cover adalah nilai yang biner r coded di suatu cara mika dan dijilid. Cukup dibuat agar laporan tidak Seperti yang kita ketahui semakin tinggi yang khusus.2c pertama -nilai-nilai seribu dari r akan tercecer bila dibaca. resolusi suatu citra maka ukuran data yang bersifat coded, sebagai integer-integer yang dihasilkan semakin besar. Ukuran data yang tidak ditandatangani, di c -1 pahat masing- 3. Laporan boleh menggunakan kertas besar membutuhkan tempat penyimpanan masing dan sisanya bersifat coded di c rius, boleh bolak-balik, boleh dalam satu (memori) yang besar pula. Hal ini dapat diatasi menggigit masing-masing (berakhir dengan c halaman kertas terdapat dua halaman tulisan dengan program kompresi data agar dapat yang paling besar menggigit nomor, yang terdiri asalkan masih terbaca. menghemat memori penyimpanan. dari c 1's). Kasus di mana seribu adalah suatu daya dari 2 ( m =2c) khusus karena itu 4. Identitas per halaman harus jelas Kompresi adalah proses pengubahan memerlukan tidak ( c -1)-bit kode. Kita (misalnya : halaman, kode kuliah). sekumpulan data menjadi bentuk kode dengan mengetahui bahwa n = r +qm; maka sekali se tujuan untuk menghemat kebutuhan tempat kode Golomb dikodekan, nilai-nilai dari q dan r Penilaian : penyimpanan. Ukuran kompresi yang baik dapat digunakan untuk dengan mudah adalah yang dapat menghasilkan rasio besar. 1. Kebenaran program (50%) : program merekonstruksi n. mampu memroses data yang sudah disediakan Algoritma yang akan dibahas dalam tugas akhir Ada juga kasus umum di mana p tidak dikenal dan data dari asisten. ini adalah algoritma Elias Gamma Coding. dan tidak bisa dihitung (atau bahkan Algoritma ini termasuk jenis algoritma lossy diperkirakan) terlebih dahulu, karena dawai itu 2. Demo – pemahaman Anda dalam compression yang berarti media yang pembuatan program (30%) adalah sangat panjang atau karena itu harus dikompresi berupa image. Algoritma ini dimampatkan di dalam waktu nyata selagi itu tergolong baru berkembang dalam jangka waktu 3. Laporan (20%) tiba dari sumber nya. Dalam kasus yang 5 tahun terakhir maka penyusun mencoba demikian, satu algoritma yang adaptip itu mengimplementasi program kompresi data 4. Interface, feature-feature program, dan bervariasi seribu menurut input-so-far itu adalah unsur kreativitas (10%) pilihan terbaik. Algoritma seperti itu, yang

B-19

disebut Goladap [Langdon 83a], digambarkan di Banyak metoda kompresi didasarkan pada awalan yang parametrized mengkode. Golomb sini. menjalankan pengkodean panjangnya (RLE). mengkode digambarkan di sini [Golomb 66] Bayangkan a dawai biner di mana suatu kosong adalah seperti itu kode dan mereka adalah yang Mereka memb muncul dengan kemungkinan p dan yang terbaik untuk kompresi data item yang dibagi- muncul dengan kemungkinan 1-p. Jika p besar, bagikan secara geometris. ktikan bahwa kode Golomb adalah awalan akan ada berlari tentang kosong-kosong, terbaik mengkode ketika seribu terpilih oleh mengusulkan pemakaian RLE untuk mereka ketidaksamaan. Kita pertanda pertama memampatkan dawai. Kemungkinan suatu lari bahwa karena suatu yang diberi p, dari n kosong-kosong adalah pn dan COMPRESSING LANGUAGE MODELS WITH ketidaksamaan (23) hanya mempunyai satu kemungkinan suatu lari dari n nol yang diikuti GOLOMB CODING solusi m. Kita mengolah ketidaksamaan ini oleh suatu 1 adalah pn(1 -p), menunjukkan dalam empat langkah-langkah sebagai berikut: bahwa menjalankan panjangnya-panjangnya BACKGROUND The discussion below is merely dibagi-bagikan secara geometris. provided for general background information Tiga contoh diperkenalkan di sini untuk and is not intended to be used as an aid in menggambarkan penampilan dari Golomb Suatu pendekatan yang naif kepada determining the scope of the claimed subject mengkode memampatkan dawai seperti itu untuk matter. menghitung kemungkinan dari tiap menjalankan di dalam memampatkan menjalankan panjangnya dan menerapkan metoda Huffman Language models are used in a variety of panjangnya-panjangnya. Contoh yang pertama (Bagian 28) untuk memperoleh awalan terbaik applications including noisy channel adalah dawai yang biner (21), yang mempunyai mengkode karena menjalankan panjangnya- applications such as natural language 41 panjangnya. Dalam praktek, bagaimanapun, processing, spell checking, and the like. In mungkin ada sejumlah besar menjalankan natural language applications, a speech nol dan 18 mereka. Kemungkinan suatu kosong panjangnya-panjangnya recognizer typically works by combining kemudian 41/(41 + 18) ˜07, hasil?penyerahan acoustic evidence (channel model) with dan nomor ini tidak akan dikenal terlebih expectations about what the user is likely to say m = -bukukan 17/ batang kayu 07 = 1487 = dahulu. Suatu pendekatan yang lebih baik untuk (language model) . One common form of 2.Urutan dari menjalankan panjangnya- membangun satu keluarga yang tanpa batas language models is referred to as a tri-gram. panjangnya 5, 2 0, 3, 1, 6, 0, 0, dari awalan optimal mengkode, seperti bahwa tak peduli bagaimana merindukan suatu lari In general, a n-gram is a subsequence of n 1, 3, 5, 3, 2, 3, 0, 1, 4, dan 2 kaleng oleh karena tokens itu disandikan dengan Golomb mengkode untuk adalah, di sana akan merupakan suatu kode di dalam keluarga itu untuk menyandi nya. seribu =2 (words) . A tri-gram is a subsequence of 3 Mengkode di dalam keluarga itu harus tokens. For example, from the phrase "to be or bergantung pada kemungkinan p, jadi kita ke dalam dawai dari 18 mengkode not to be", 8 tri-grams can be generated: "$ $ sedang mencari satu himpunan takhingga dari to", "$ to be", "to be or", "be or not", "or not to",

B-20

"not to be," "to be $" and "be $ $," where the In one embodiment, a language model is BRIEF DESCRIPTION OF THE DRAWINGS input string is padded with two special tokens compressed using Golomb encoding techniques denoted at: "$." Statistics can be applied to . A list of values is generated from elements of FIG. 1 is a block diagram of one computing such n-grams to estimate a likelihood that a the language model. The list of integer values is environment in which embodiments may be user intended a particular input. sorted, and for each element, a difference practiced. between adjacent integer values in the list is Though a billion words of text used to be calculated. Each calculated difference is FIG. 2 is a block diagram of an alternative considered large, training sets for speech encoded using a Golomb code. computing environment in which embodiments recognition routinely train on ten billion words may be practiced. of text. In general, large language models work In another embodiment, a system for processing well (meaning they have low entropy) ; however, user inputs has a user interface, a memory, a FIG. 3 is a simplified flow diagram of an memory capacity is often limited, especially in Golomb encoder/decoder, and a processor. The embodiment of a process for compressing a mobile devices such as cell phones, personal user interface is adapted to receive user inputs . language model for use in computing devices . digital assistants (PDAs), electronic planners, The memory is adapted to store information and and the like. One technique for addressing the to store a Golomb compressed language model. FIG. 4 is a simplified flow diagram, of a process memory situation involves trimming the The Golomb encoder/decoder is adapted to for Golomb coding differences between hash language model, by removing infrequently used encode user input and to decode elements of values calculated according to the process of words and uncommon variants. However, the Golomb compressed language model. The FIG. 3. removal of such terms reduces the overall processor is adapted to compare encoded user FIG. 5 is a simplified block diagram of a Huffman effectiveness of the language model, leading to input against elements of the Golomb tree illustrating a unary code.. more semantic errors due to inability to match compressed language model to identify input to words in the trimmed model . probable matches . FIG. 6 is a simplified flow diagram of an embodiment of a process for decoding a SUMMARY In another embodiment, a method of decoding Golomb coded first difference. user inputs using a Golomb-encoded language This summary is provided to introduce in a model is provided. A user input is divided into a FIG. 7 is a simplified block diagram of an simplified form some concepts, which are plurality of- elements, each of which is encoded embodiment of a system adapted for using a described below in the Detailed Description. using a hash technique. Each encoded element language model compressed with Golomb This Summary is not intended to identify key is compared to elements of a Golomb-encoded coding techniques. features or essential features of the claimed language model to identify possible matches. subject matter, nor is it intended to be used as Possible matches are analyzed statistically to FIG. 8 is a simplified flow diagram of an an aid in determining the scope of the claimed estimate a likelihood that a possible match is a embodiment of a process for decoding user subject matter. correct mapping of the user input to the input against a Golomb-encoded language Golomb-encoded language model. model.

B-21

DETAILED DESCRIPTION purpose computing system environments or of a computer 110. Components of computer configurations. Examples of well-known 110 may include, but are not limited to, a Language models are utilized in speech computing systems, environments, and/or processing unit 120, a system memory 130, and recognition systems, in context sensitive configurations that may be suitable for use with a system bus 121 that spelling correction systems, in interfaces used embodiments of the invention include, but are to enter Asian characters into computers, and not limited to, personal computers, server couples various system components including the like. Golomb compression techniques can computers, hand-held or laptop devices, the system memory to the processing unit 120. be applied to user inputs, such as uniform multiprocessor systems, microprocessor-based The system bus 121 may be any of several types resource locator (URL) data for navigating systems, set top boxes, programmable of bus structures including a memory bus or global computer networks, such as the Internet. consumer electronics, network PCs, memory controller, a peripheral bus, and a local Since memory is often limited in practice, minicomputers, mainframe computers, bus using any of a variety of bus architectures. especially in mobile platforms such as cell telephony systems, distributed computing By way of example, and not limitation, such phones, personal digital assistants (PDAs) , and environments that include any of the above architectures include Industry Standard the like, compression of the language model can systems or devices, and the like. Embodiments Architecture (ISA) bus, Micro Channel be quite useful, and Golomb coding techniques may be described in the general context of Architecture (MCA) bus, Enhanced ISA (EISA) can be used both to compress a language model computer-executable instructions, such as bus, Video Electronics Standards Association and to decode results. program modules, being executed by a (VESA) local bus, and Peripheral Component computer. Generally, program modules include Interconnect (PCI) bus also known as Mezzanine FIG. 1 illustrates an example of a suitable routines, programs, objects, components, data bus. computing system environment 100 on which structures, etc. that perform particular tasks or embodiments language model compression implement particular abstract data types. The 1000 5, 888 55,701,699 29 21,383 techniques may be implemented. The invention is designed to be practiced in distributed computing environments where Table 2 illustrates memory usage for one computing system environment 100 is only one tasks are performed by remote processing embodiment of Golomb coded hash values for example of a suitable computing environment devices that are linked through a URLs. Memory depends on both the number of and is not intended to suggest any limitation as communications network. In a distributed URLs (N) and average delta (P/N) . The table to the scope of use or functionality of the computing environment, program modules are illustrates 3 settings of average delta, invention. Neither should the computing located in both local and remote computer corresponding to 14-29 bits per URL. This type environment 100 be interpreted as having any storage media including memory storage of compression makes it possible to incorporate dependency or requirement relating to any one devices . large language models in portable devices. or combination of components illustrated in the exemplary operating environment 100. With reference to FIG. 1, an exemplary system In general, the language model can be used to for implementing an embodiment includes a assist a user in accessing information. For Embodiments of the invention are operational general-purpose computing device in the form example, in a search engine, Golomb coding with numerous other general purpose or special techniques can be employed to test alternate

B-22

spellings of search terms provided by the user. Although the present invention has been pertidaksamaan ) sampai tugas selesai. Desain In the context of a web browser on a portable described with reference to particular dan analisis algorithma adalah suatu cabang device, Golomb compressions embodiments, workers skilled in the art will khusus dalam Ilmu Komputer yang mempelajari (coding/decoding) techniques can be adapted to recognize that changes may be made in form karakteristik dan performa dari suatu algoritma test alternative URL values in order to correct and detail without departing from the spirit and dalam menyelesaikan masalah, terlepas dari for mistyped URLs. scope of the invention . implementasi algoritma tersebut. Dalam cabang disiplin ini algoritma dipelajari secara abstrak, FIG. 8 is a simplified flow diagram of an Algoritma terlepas dari sistem komputer atau bahasa embodiment for decoding a user input relative pemrograman yang digunakan. Algoritma yang to a Golomb-coded language model. A user Pendahuluan berbeda dapat diterapkan pada suatu masalah input is received or read, for example, symbol dengan kriteria yang sama. Kompleksitas dari by symbol from a data stream, a file, or an input Kata Algoritma berasal dari nama seorang ahli suatu algoritma merupakan ukuran seberapa device (step matematika dari persia Al Khawarizmi . Pada banyak komputasi yang dibutuhkan algoritma awalnya kata algorism adalah istilah yang tersebut untuk menyelesaikan masalah. Secara 800) . The user input is divided into a plurality of merujuk kepada aturan-aturan aritmetis untuk informal, algoritma yang dapat menyelesaikan n-grams menyelesaikan persoalan dengan menggunakan suatu permasalahan dalam waktu yang singkat bilangan numerik arab. Pada abad 18, istilah ini memiliki kompleksitas yang rendah, sementara (step 802) . Each of the plurality of n-gramsi are berkembang menjadi algoritma , yang mencakup algoritma yang membutuhkan waktu lama untuk encoded using a hash technique (step 804) . semua prosedur atau urutan langkah yang jelas menyelesaikan suatu masalah membutuhkan Each encoded n-gram is compared to the dan diperlukan untuk menyelesaikan suatu kompleksitas yang tinggi. Golomb-coded language model to identify permasalahan. Jika dijelaskan lebih lanjut, possible matches (step 806) . A likelihood is algoritma (Inggris: algorithm) merupakan Jenis-jenis Algoritma estimated statistically for each possible match kumpulan perintah untuk menyelesaikan suatu that the possible match is a correct mapping of masalah. Perintah-perintah ini dapat Terdapat beragam klasifikasi algoritma dan the received user input to an element within the diterjemahkan secara bertahap dari awal hingga setiap klasifikasi mempunyai alasan tersendiri. Golomb-coded language model (step 808) . Any akhir. Masalah tersebut dapat berupa apa saja, Salah satu cara untuk melakukan klasifikasi number dengan catatan untuk setiap masalah, ada jenis-jenis algoritma adalah dengan kriteria kondisi awal yang harus dipenuhi memperhatikan paradigma dan metode yang of statistical algorithms can be applied to sebelum menjalankan algoritma. Algoritma akan digunakan untuk mendesain algoritma tersebut. estimate the likelihood that a given match is dapat selalu berakhir untuk semua kondisi awal Beberapa paradigma yang digunakan dalam correct. In general, each n- gram can be yang memenuhi kriteria, berbeda dengan menyusun suatu algoritma akan dipaparkan encoded using Golomb-encoding technique, heuristik . Algoritma sering mempunyai langkah dibagian ini. Masing-masing paradigma dapat such as that described above with respect to pengulangan ( iterasi ) atau memerlukan digunakan dalam banyak algoritma yang FIG. 4. keputusan ( Aljabar Boolean dan berbeda.

B-23

- Divide and Conquer , paradigma untuk an:Algoritmo program, dan apa yang tidak ( komputabilitas membagi suatu permasalahan besar menjadi dan intelegensia buatan ), bagaimana program permasalahan-permasalahan yang lebih kecil. Secara umum, Ilmu komputer (Ilkom), atau yang harus mengevaluasi suatu hasil ( algoritma ), Pembagian masalah ini dilakukan terus menerus dalam bahasa Inggrisnya disebut Computer bagaimana program harus menyimpan dan sampai ditemukan bagian masalah kecil yang Science (CS), adalah ilmu yang mempelajari mengambil bit tertentu dari suatu informasi ( mudah untuk dipecahkan. Singkatnya tentang komputasi , baik perangkat keras struktur data ), dan bagaimana program dan menyelesaikan keseluruhan masalah dengan (hardware) maupun perangkat lunak (software). pengguna berkomunikasi ( antarmuka pengguna membagi masalah besar dan kemudian Ilmu komputer mencakup beragam topik dan bahasa pemrograman ). Ilmu komputer memecahkan permasalahan-permasalahan kecil berkaitan dengan komputer , dari analisa berakar dari elektronika , matematika dan yang terbentuk. abstrak algoritma sampai subyek yang lebih linguistik . Dalam tiga dekade terakhir dari abad konkret seperti bahasa pemrograman , 20 , ilmu komputer telah menjadi suatu disiplin - Dynamic programming , paradigma perangkat lunak , dan perangkat keras . Sebagai ilmu baru dan telah mengembangkan metode pemrograman dinamik akan sesuai jika suatu disiplin ilmu, Ilmu Komputer berbeda dan istilah sendiri. Departemen ilmu komputer digunakan pada suatu masalah yang dengan pemrograman komputer , rekayasa pertama didirikan di Universitas Purdue pada mengandung sub-struktur yang optimal (, dan perangkat lunak dan teknik komputer , sekalipun tahun 1962 . Hampir semua universitas sekarang mengandung beberapa bagian permasalahan ketiga istilah tersebut sering disalahartikan. mempunyai departemen ilmu komputer. yang tumpang tindih . Paradigma ini sekilas Tesis Church-Turing menyatakan bahwa semua Penghargaan tertinggi dalam ilmu komputer terlihat mirip dengan paradigma Divide and alat komputasi yang telah umum diketahui adalah Turing Award , pemenang penghargaan Conquer , sama-sama mencoba untuk membagi sebenarnya sama dalam hal apa yang bisa ini adalah semua pionir di bidangnya. Edsger permasalahan menjadi sub permasalahan yang mereka lakukan, sekalipun dengan efisiensi Dijkstra mengatakan: :Ilmu komputer bukan lebih kecil, tapi secara intrinsik ada perbedaan yang berbeda. Tesis ini terkadang dianggap tentang komputer sebagaimana astronomi dari karakter permasalahan yang dihadapi. sebagai prinsip dasar dari ilmu komputer. Para bukan tentang teleskop Fisikawan ternama ahli ilmu komputer biasanya menekankan mesin Richard Feynman mengatakan: :Ilmu komputer - Metode serakah. Sebuah algoritma serakah von Neumann atau mesin Turing (komputer umurnya tidak setua fisika; lebih muda beberapa mirip dengan sebuah Pemrograman dinamik , yang mengerjakan tugas yang kecil dan ratus tahun. Walaupun begitu, ini tidak berarti bedanya jawaban dari submasalah tidak perlu deterministik pada suatu waktu tertentu), karena bahwa "hidangan" ilmuwan komputer jauh lebih diketahui dalam setiap tahap; dan menggunakan seperti itulah kebanyakan komputer digunakan sedikit dibanding fisikawan. Memang lebih pilihan "serakah" apa yang dilihat terbaik pada sekarang ini. Para ahli ilmu komputer juga muda, tapi dibesarkan secara jauh lebih intensif! saat itu. mempelajari jenis mesin yang lain, beberapa diantaranya praktikal (seperti paralel komputer Catatan tentang istilah 'Informatika' dan 'Ilmu Lihat pula dan Kuantum komputer ) dan beberapa komputer' diantaranya cukup teoritis (seperti Random - Daftar algoritma komputer and Oracle komputer ). Ilmu Komputer Dalam bahasa Indonesia , istilah Informatika mempelajari apa yang bisa dilakukan oleh diturunkan dari bahasa Perancis informatique, af:Algoritme

B-24

yang dalam bahasa Jerman disebut Informatik. yang saling berinteraksi dan bekerja sama - Aljabar Boolean Sebenarnya, kata ini identik dengan istilah berdasarkan suatu prosedur kerja (aturan kerja) computer science di Amerika Serikat dan yang telah ditetapkan, dimana memproses dan - Matematika Diskrit computing science di Inggris. Namun, istilah mengolah data menjadi suatu bentuk informasi informatics dalam bahasa Inggris memiliki yang dapat digunakan dalam mendukung - Teori graf makna yang sedikit berbeda, yaitu lebih keputusan. menekankan pada aspek pengolahan informasi - Teori Informasi secara sistematis dan rasional. Rekayasa perangkat lunak - Logika Simbolik Hubungan Informatika dengan bidang lain Rekayasa Perangkat Lunak menekankan analisa, desain, dan konstruksi dari perangkat - Peluang and Statistik Ilmu komputer berkaitan erat dengan beberapa lunak menggunakan alat-alat dan cara kerja Teori Ilmu Komputer bidang lain. Bidang-bidang ini tidak benar-benar yang baru. terpisah, sekalipun mempunyai perbedaan - Teori Informasi Algoritmik penting. Rekayasa Komputer - Kompilator Ilmu Informasi Rekayasa Komputer adalah ilmu yang mempelajari analisa, desain, dan konstruksi dari - Analisis Leksikal Ilmu Informasi adalah ilmu yang mempelajari perangkat keras komputer. Ilmu yang data dan informasi, mencakup bagaimana mempelajari segala aspek pembuatan, - Penguraian menginterpretasi, menganalisa, menyimpan, dan konstruksi, pemeliharaan perangkat lunak mengambil kembali. Ilmu informasi dimulai - Kriptografi sebagai dasar dari analisa komunikasi dan basis Keamanan Informasi data . - Semantik Denotasional Keamanan Informasi adalah ilmu yang Sistem Informasi mempelajari analisa dan implementasi dari - Komputasi (atau Ilmu Komputer Teoritis) keamanan sistem informasi (termasuk Sistem Informasi adalah aplikasi komputer Kriptografi ). - analisa dari algoritma dan Teori Kompleksitas untuk mendukung operasi dari suatu organisasi: Komputasi dari problem operasi, instalasi, dan perawatan komputer, Cabang Ilmu Utama Informatika perangkat lunak, dan data. Sistem Informasi - logika dan arti dari program Manajemen adalah kunci dari bidang yang Dasar Matematika menekankan finansial dan personal manajemen. - logika matematika dan bahasa formal 'Sistem Informasi' dapat berupa gabungan dari beberapa elemen teknologi berbasis komputer - Teori Tipe

B-25

Perangkat Keras - Kinerja dari Sistem - Struktur Data

(lihat juga elektronika ) - Implementasi dari Sistem Komputer - Representasi penyimpan data

- struktur kontrol dan Mikroprogram Perangkat Lunak - Kriptografi

- aritmetic dan struktur logika - Kompresi data

- struktur memori - Program Komputer and Pemrograman - Pengkodean dan Teori Informasi Komputer - masukan/keluaran dan komunikasi data - Berkas - Pemrograman Paralel - media penyimpanan - Format Berkas - Spesifikasi Program - CD Media dan CD ROM - Sistem Informasi - Verifikasi Program - desain logika - Basis Data - Teknik Pemrograman - sirkuit terpadu - Penyimpanan dan Pengambilan Informasi - Rekayasa Perangkat Lunak Informasi - Very Large System Integration - Optimisasi Perangkat Lunak - Antarmuka dan presentasi informasi - kinerja dan reliabilitas - Metrik Perangkat Lunak Metodologi Komputasi Organisasi Sistem Komputer - Pola Desain (Ilmu Komputer) (lihat juga elektronika ) - Metode Pengembangan Perangkat Lunak - manipulasi simbolik dan aljabar - Arsitektur Komputer - Bahasa Pemrograman - Kecerdasan Buatan - Jaringan Komputer - Sistem Operasi - Grafik Komputer - Komputasi Terdistribusi Data dan Sistem Informasi - Pengolahan Citra dan Visi Komputer - Komputasi Grid - Pengenalan Pola

B-26

- Pengenalan Suara - Seni dan kemanusiaan Sejarah

- Simulasi dan Pemodelan - rekayasa berbantuan komputer - Sejarah dari Perhitungan

- Pengolahan dokumen dan teks - Robotik - Projek pemrograman awal

- Pengolahan Sinyal Digital - Interaksi manusia dan komputer - Departemen Ilmu Komputer

Aplikasi Komputer - Sintesa suara - Garis Waktu dari Algoritma

- Pengolahan data administratif - Rekayasa kedapatgunaan Ahli Terkenal Ilmu Komputer

- Perangkat lunak matematika - Hiburan - John Backus Penemu FORTRAN, bahasa pemrograman tingkat tinggi pertama dan - Analisis numerik - Permainan Komputer susunan Backus-Naur untuk mendeskripsikan bahasa formal sintaks . - Pembukti teori otomatis Lingkungan Komputasi - James Cooley dan John Tuckey Fourier - Aljabar komputer - Industri Komputer Transform Cepat (Fast Fourier Transform) dan pengaruhnya pada riset keilmuan. - Ilmu dan teknik fisika - Sejarah dari Perhitungan - Ole-Johan Dahl dan Kristen Nygaard , penemu - Kimia Komputasional - Komputer dan pendidikan bahasa berorientasi objek SIMULA.

- Fisika Komputasional - Komputer dan masyarakat - Edsger Dijkstra untuk algoritma, Goto .

- Ilmu hayat dan medis - Kerja Kooperatif Didukung Komputer - Kenneth Iverson Penemu APL, untuk kontribusinya di perhitungan interaktif. - Bioinformatika - Aspek hukum dari komputer - William Kahan untuk standard IEEE floating- - Biologi Komputasional - manajemen dari komputasi dan sistem point. informasi - Informatika Medika - Donald Knuth untuk Seni dari Pemrograman - personal komputer - Sosiologi Komputer - Keamanan Komputer dan Keamanan Informasi

B-27

- Ada Lovelace programer terkenal pertama di - Medali IEEE John von Neumann dunia - Hello world - John von Neumann yang telah mengembangkan arsitektur von Neumann . - Istilah Komputer

- Claude E. Shannon untuk teori informasi - Berkas Istilah

- Alan Turing untuk teori komputabilitas. - Topik utama Ilmu Komputer

- James Wilkinson Teknik "analisa kesalahan - Analogi Perhitungan dari belakang" dan kemajuan di bidang perhitungan matriks. Wilkinson adalah juga - Internet penggerak dalam pengembangan Pilot ACE, komputer di Inggris yang pertama, pada akhir - Multimedia 1940-an. (lihat Wilkinson pada biografi - Akusisi data MacTutor.) - Tolok - Konrad Zuse Pembuat binari komputer yang pertama pada 1930-an, di mana dia - Jaringan Sensor menrencanakan bahasa pemrograman jauh sebelum waktunya. Lihat Daftar Ahli Ilmu - Komputasi dan Algorithma Online , Komputer untuk informasi lebih lanjut. - Format Bilangan Komputer Lihat juga Pranala Luar - Bug

- Bahasa Pemrograman

- Perhitungan

- Sejarah dari Perhitungan

- Turing Award ( ACM )

B-28