hofzge
-
Posts
5 -
Joined
-
Last visited
Content Type
Profiles
Forums
Downloads
Gallery
Posts posted by hofzge
-
-
Sorry for being so cryptic: What i try to replace is this:
- # Converts from base64 to binary
- function ConvertFrom-Base64($string)
- {
- $bytes = [system.Convert]::FromBase64String($string);
- $decoded = [system.Text.Encoding]::UTF8.GetString($bytes);
- return $decoded;
- }
- # Does buffered read of all bytes from a stream
- # returns a char array
- function ReadAllBytes($stream)
- {
- $buffer = New-Object byte[](4096)
- $ms = New-Object System.IO.MemoryStream
- $bytesRead = 0
- do
- {
- $bytesRead = $stream.Read($buffer, 0, $buffer.Length)
- if ($bytesRead -gt 0)
- {
- $ms.Write($buffer, 0, $bytesRead)
- }
- } while ($bytesRead -gt 0)
- return [system.Text.Encoding]::UTF8.GetChars($ms.ToArray())
- }
- # Removes 'Zipped:', Converts from base64 and unzips
- function FromBase64AndUnzip($string)
- {
- $string = $string.Replace("Zipped:", "")
- $dataBytes = [system.Convert]::FromBase64String($string)
- $memStream = New-Object System.IO.MemoryStream $dataBytes, 0, $dataBytes.Count
- $memStream.Position = 0
- $gzipStream = New-Object System.IO.Compression.GzipStream $memStream, ([iO.Compression.CompressionMode]::Decompress)
- $uncompressed = ReadAllBytes($gzipStream)
- return New-Object String(($uncompressed), 0, $uncompressed.length)
- }
From what i understand this is in fact a gzip stream. Am I wrong?
-
I already replied on NI and would like to ask here for help. Using Sam_Sharps method i try to decopress a zipped stream of and run out of memory, which seems strange as the string is only about some about 1 MB long.
Do I need to work on parts of the string? I see there is a calculation for the compression and the memory allocated to the containing the uncompressed string. How can this be so large for such a small stream?
What I did is similar to this:
-
-
I have a project that i took over and as part of this project drivers are packed into a .llb which is then loaded. This has all worked well in the past on my predecessors PC but I get this:
LabVIEW cannot find a file that is a dependency of a Startup, Exported, or Always Included VI.File Not Found: C:\Program Files (x86)\National Instruments\LabVIEW 2013\vi.lib\utf\common\utf_test_result_troll.ctlThe missing file might be referenced by one of the libraries included in the build or by the file - HIPI-Simulation.lvclass. To fix this issue:- Open all Startup, Exported, or Always Included VIs, recompile them (CTRL+SHIFT Click the Run arrow) and save them to update their dependencies.<Call Chain>Error 7 occurred at AB_Engine_HandleLinkErrors.vi -> AB_Engine_Update_Source_from_Linker.vi -> AB_Build.lvclass:CalculateDependencies.vi -> AB_Build.lvclass:Build.vi -> AB_API Do Two Step Build.vi:4020001 -> AB_API Build.vi:4700001 -> NI_AB_API_Build.lvclass:Build.vi -> NI_AB_API_SDIST.lvclass:Build.vi -> Build_HipiDriversThunderball.vi -> Build.viPossible reason(s):LabVIEW: File not found. The file might be in a different location or deleted. Use the command prompt or the file explorer to verify that the path is correct.=========================NI-488: Nonexistent GPIB interface.-------Is my Labview too new and vi.lib has changed? Did I delete parts of vi.lib?
Open G Zip Tools on Linux RT
in OpenG General Discussions
Posted
Thanks - being an idiot i forgot to convert from Base64 to String and this helped.