Skip to content

Commit

Permalink
v0.4.7: Added paq8px v199.
Browse files Browse the repository at this point in the history
  • Loading branch information
moisespr123 committed Dec 30, 2020
1 parent a390779 commit 1bf011b
Show file tree
Hide file tree
Showing 7 changed files with 64 additions and 13 deletions.
4 changes: 4 additions & 0 deletions Changelog.txt
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
v0.4.7
- Added paq8px v199.
- Added option to delete the File List when compression finish.

v0.4.6
- Added paq8pxd v92 and v93.

Expand Down
17 changes: 15 additions & 2 deletions PAQCompress/Form1.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

28 changes: 22 additions & 6 deletions PAQCompress/Form1.vb
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,8 @@
Private Const paq8pxd_add_x_levels As Integer = 28
Private Const paq8px_nativecpus As Integer = 100
Private DistributedPAQCompressors As New Dictionary(Of String, String())() From {{"PAQ8PX", {"v185", "v186", "v186fix1", "v187",
"v187fix3", "v187fix5", "v188", "v189", "v193fix2", "v198"}},
"v187fix3", "v187fix5", "v188", "v189",
"v193fix2", "v198", "v199"}},
{"PAQ8PXd", {"v85", "v86"}}}

Private Sub Form1_Load(ByVal sender As Object, ByVal e As EventArgs) Handles MyBase.Load
Expand All @@ -33,6 +34,7 @@
f_flag.Checked = My.Settings.f_flag
l_flag.Checked = My.Settings.l_flag
r_flag.Checked = My.Settings.r_flag
deleteFileList.Checked = My.Settings.deleteFileList
useNativeCPU.Checked = My.Settings.useNativeCPU
ShowCMD.Checked = My.Settings.ShowCMD
GenerateBatchScriptOnly.Checked = My.Settings.OnlyGenerateBatchFile
Expand Down Expand Up @@ -185,7 +187,8 @@
"v168", "v169", "v170", "v171", "v172", "v173", "v174", "v175", "v176", "v177", "v178", "v179", "v179fix1",
"v179fix2", "v179fix3", "v179fix4", "v179fix5", "v180", "v181", "v181fix1", "v182", "v182fix1", "v182fix2",
"v183", "v183fix1", "v184", "v185", "v186", "v186fix1", "v187", "v187fix1", "v187fix2", "v187fix3", "v187fix4", "v187fix5",
"v188", "v189", "v190", "v191", "v191a", "v192", "v193", "v193fix1", "v193fix2", "v194", "v195", "v196", "v197", "v198"})
"v188", "v189", "v190", "v191", "v191a", "v192", "v193", "v193fix1", "v193fix2", "v194", "v195", "v196", "v197", "v198",
"v199"})
PAQVersion.Enabled = True
End If
If PAQVersion.Enabled Then
Expand Down Expand Up @@ -355,6 +358,7 @@
t_flag.Enabled = True
a_flag.Enabled = True
s_flag.Enabled = True
deleteFileList.Enabled = True
DontCreateTextFile.Enabled = True
If PAQVersion.SelectedIndex > f_flag_available And PAQVersion.SelectedIndex <= f_flag_disable Then
f_flag.Enabled = True
Expand Down Expand Up @@ -388,6 +392,7 @@
r_flag.Enabled = False
r_flag.Text = "Perform initial retraining of the LSTM on text blocks"
useNativeCPU.Enabled = False
deleteFileList.Enabled = False
DontCreateTextFile.Enabled = False
End Sub

Expand All @@ -406,6 +411,7 @@
Private Sub StartButton_Click(sender As Object, e As EventArgs) Handles StartButton.Click
Dim CompressorToUse As String = String.Empty
Dim CompressionParameters As String = String.Empty
Dim textFile As String = String.Empty
If String.IsNullOrWhiteSpace(InputLocation.Text) Then
MessageBox.Show("The Input field cannot be empty.")
Exit Sub
Expand Down Expand Up @@ -509,7 +515,7 @@
If CompressRButton.Checked Then
If PAQVersion.SelectedIndex > Flags_enable Then
Dim CompressionFlags As String = GetPAQ8PXCompressionFlags()
Dim textFile As String = OutputLocation.Text + ".txt"
textFile = OutputLocation.Text + ".txt"
If IO.Directory.Exists(InputLocation.Text) Then
Dim textFileStream As New IO.StreamWriter(textFile, False)
textFileStream.WriteLine()
Expand Down Expand Up @@ -546,7 +552,7 @@
CompressionParameters = "/C @""" + CompressorToUse + """ " + CompressionParameters + " & pause"
CompressorToUse = "cmd.exe"
End If
Dim StartCompressionThread = New Threading.Thread(Sub() CompressionThread(CompressorToUse, CompressionParameters, CompressorPath))
Dim StartCompressionThread = New Threading.Thread(Sub() CompressionThread(CompressorToUse, CompressionParameters, CompressorPath, textFile, PAQSeries.SelectedItem))
StartCompressionThread.Start()
Else
Dim OutputPath As String
Expand All @@ -566,7 +572,7 @@
End If
End If
End Sub
Private Sub CompressionThread(Compressor As String, Params As String, CompressorPath As String)
Private Sub CompressionThread(Compressor As String, Params As String, CompressorPath As String, textFile As String, PAQSeries As String)
Using process As New Process()
process.StartInfo.WorkingDirectory = CompressorPath
process.StartInfo.FileName = Compressor
Expand All @@ -583,8 +589,13 @@
process.BeginErrorReadLine()
End If
process.WaitForExit()
If deleteFileList.Checked And PAQSeries = "PAQ8PX" Then
If IO.File.Exists(textFile) Then
IO.File.Delete(textFile)
End If
End If
StartButton.BeginInvoke(Sub() StartButton.Enabled = True)
SaveLogButton.BeginInvoke(Sub() SaveLogButton.Enabled = True)
SaveLogButton.BeginInvoke(Sub() SaveLogButton.Enabled = True)
End Using
End Sub

Expand Down Expand Up @@ -811,4 +822,9 @@
My.Settings.Save()
AdjustOutputFilename(InputLocation.Text)
End Sub

Private Sub deleteFileList_CheckedChanged(sender As Object, e As EventArgs) Handles deleteFileList.CheckedChanged
My.Settings.deleteFileList = deleteFileList.Checked
My.Settings.Save()
End Sub
End Class
4 changes: 2 additions & 2 deletions PAQCompress/My Project/AssemblyInfo.vb
Original file line number Diff line number Diff line change
Expand Up @@ -31,5 +31,5 @@ Imports System.Runtime.InteropServices
' by using the '*' as shown below:
' <Assembly: AssemblyVersion("1.0.*")>

<Assembly: AssemblyVersion("0.4.6.0")>
<Assembly: AssemblyFileVersion("0.4.6.0")>
<Assembly: AssemblyVersion("0.4.7.0")>
<Assembly: AssemblyFileVersion("0.4.7.0")>
14 changes: 13 additions & 1 deletion PAQCompress/My Project/Settings.Designer.vb

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 4 additions & 1 deletion PAQCompress/My Project/Settings.settings
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
<Value Profile="(Default)">1</Value>
</Setting>
<Setting Name="PAQVersion" Type="System.String" Scope="User">
<Value Profile="(Default)">v198</Value>
<Value Profile="(Default)">v199</Value>
</Setting>
<Setting Name="compiler" Type="System.String" Scope="User">
<Value Profile="(Default)">jit</Value>
Expand Down Expand Up @@ -71,5 +71,8 @@
<Setting Name="localServer" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
<Setting Name="deleteFileList" Type="System.Boolean" Scope="User">
<Value Profile="(Default)">False</Value>
</Setting>
</Settings>
</SettingsFile>
5 changes: 4 additions & 1 deletion PAQCompress/app.config
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@
<value>1</value>
</setting>
<setting name="PAQVersion" serializeAs="String">
<value>v198</value>
<value>v199</value>
</setting>
<setting name="compiler" serializeAs="String">
<value>jit</value>
Expand Down Expand Up @@ -96,6 +96,9 @@
<setting name="localServer" serializeAs="String">
<value>False</value>
</setting>
<setting name="deleteFileList" serializeAs="String">
<value>False</value>
</setting>
</PAQCompress.My.MySettings>
</userSettings>
<startup><supportedRuntime version="v4.0" sku=".NETFramework,Version=v4.8"/></startup></configuration>

0 comments on commit 1bf011b

Please sign in to comment.