Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
Justin Piper
VuhDo
Commits
8f9a82f3
Commit
8f9a82f3
authored
9 years ago
by
Ivaria
Browse files
Options
Download
Email Patches
Plain Diff
Added Huffman compression for profile sharing and storage
parent
c8e9756f
Changes
6
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
62 additions
and
8 deletions
+62
-8
.pkgmeta
.pkgmeta
+1
-0
VuhDo.xml
VuhDo.xml
+1
-0
VuhDoAddonAdapter.lua
VuhDoAddonAdapter.lua
+2
-0
VuhDoOptions/VuhDoComms.lua
VuhDoOptions/VuhDoComms.lua
+37
-2
VuhDoToolbox.lua
VuhDoToolbox.lua
+20
-6
changelog.txt
changelog.txt
+1
-0
No files found.
.pkgmeta
View file @
8f9a82f3
...
...
@@ -15,6 +15,7 @@ externals:
Libs/LibSharedMedia-3.0: svn://svn.wowace.com/wow/libsharedmedia-3-0/mainline/trunk/LibSharedMedia-3.0
Libs/LibDataBroker-1.1: git://git.wowace.com/wow/libdatabroker-1-1/mainline.git
Libs/UTF8: svn://svn.wowace.com/wow/utf8/mainline/trunk
Libs/LibCompress: svn://svn.wowace.com/wow/libcompress/mainline/trunk
VuhDoOptions/Libs/ChatThrottleLib: svn://svn.wowace.com/wow/chatthrottlelib/mainline/trunk
...
...
This diff is collapsed.
Click to expand it.
VuhDo.xml
View file @
8f9a82f3
...
...
@@ -7,6 +7,7 @@
<Script
file=
"Libs\LibDataBroker-1.1\LibDataBroker-1.1.lua"
/>
<Script
file=
"Libs\LibSharedMedia-3.0\LibSharedMedia-3.0.lua"
/>
<Script
file=
"Libs\UTF8\utf8.lua"
/>
<Script
file=
"Libs\LibCompress\LibCompress.lua"
/>
<Script
file=
"VuhDoLocalization_en.lua"
/>
<Script
file=
"VuhDoLocalization_de.lua"
/>
...
...
This diff is collapsed.
Click to expand it.
VuhDoAddonAdapter.lua
View file @
8f9a82f3
...
...
@@ -4,6 +4,8 @@ VUHDO_LibSharedMedia = LibStub("LibSharedMedia-3.0");
VUHDO_LibDataBroker
=
LibStub
(
"LibDataBroker-1.1"
,
true
);
VUHDO_LibButtonFacade
=
nil
;
VUHDO_LibCompress
=
LibStub
:
GetLibrary
(
"LibCompress"
);
VUHDO_LibCompressEncode
=
VUHDO_LibCompress
:
GetAddonEncodeTable
();
VUHDO_LibSharedMedia
:
Register
(
"font"
,
"Arial Black"
,
"Interface\\AddOns\\VuhDo\\Fonts\\ariblk.ttf"
);
VUHDO_LibSharedMedia
:
Register
(
"font"
,
"Emblem"
,
"Interface\\AddOns\\VuhDo\\Fonts\\Emblem.ttf"
);
...
...
This diff is collapsed.
Click to expand it.
VuhDoOptions/VuhDoComms.lua
View file @
8f9a82f3
...
...
@@ -125,6 +125,33 @@ end
--
function
VUHDO_getCommsData
(
aUnitName
)
if
(
aUnitName
~=
nil
)
then
VUHDO_xMsg
(
"Dumping comms data for"
,
aUnitName
);
VUHDO_xMsg
(
"sUserData"
,
VUHDO_tableToString
(
sUserData
[
aUnitName
]));
VUHDO_xMsg
(
"sRequestsInProgress"
,
VUHDO_tableToString
(
sRequestsInProgress
[
aUnitName
]));
VUHDO_xMsg
(
"sRepliesReceived"
,
VUHDO_tableToString
(
sRepliesReceived
[
aUnitName
]));
if
(
sBusyUnitName
==
aUnitName
)
then
VUHDO_xMsg
(
"sBusyUnitName"
,
sBusyUnitName
);
VUHDO_xMsg
(
"sNumChunks"
,
sNumChunks
);
end
else
VUHDO_xMsg
(
"Dumping comms data"
);
VUHDO_xMsg
(
"sUserData"
,
(
sUserData
));
VUHDO_xMsg
(
"sRequestsInProgress"
,
VUHDO_tableToString
(
sRequestsInProgress
));
VUHDO_xMsg
(
"sRepliesReceived"
,
VUHDO_tableToString
(
sRepliesReceived
));
if
(
sBusyUnitName
==
aUnitName
)
then
VUHDO_xMsg
(
"sBusyUnitName"
,
sBusyUnitName
);
VUHDO_xMsg
(
"sNumChunks"
,
sNumChunks
);
end
end
end
--
local
function
VUHDO_getFieldsFromReply
(
aUnitName
,
aReplyType
)
local
tUnitReplies
=
sRepliesReceived
[
aUnitName
];
...
...
@@ -305,14 +332,22 @@ end
--
function
VUHDO_compressForSending
(
aTable
)
return
VUHDO_compressTable
(
aTable
);
local
compressedString
=
VUHDO_compressAndPackTable
(
aTable
);
local
encodedString
=
VUHDO_LibCompressEncode
:
Encode
(
compressedString
);
return
encodedString
;
-- return VUHDO_compressAndPackTable(aTable);
end
--
function
VUHDO_decompressFromSending
(
aString
)
return
VUHDO_decompressIfCompressed
(
aString
);
local
decodedString
=
VUHDO_LibCompressEncode
:
Decode
(
aString
);
local
decompressedTable
=
VUHDO_decompressIfCompressed
(
decodedString
);
return
decompressedTable
;
-- return VUHDO_decompressIfCompressed(aString);
end
...
...
This diff is collapsed.
Click to expand it.
VuhDoToolbox.lua
View file @
8f9a82f3
...
...
@@ -719,18 +719,32 @@ end
--
function
VUHDO_decompressStringHuffman
(
aFile
)
return
"string"
==
type
(
aFile
)
and
VUHDO_LibCompress
:
DecompressHuffman
(
aFile
)
or
aFile
;
end
--
function
VUHDO_compressStringHuffman
(
aFile
)
return
"string"
==
type
(
aFile
)
and
VUHDO_LibCompress
:
CompressHuffman
(
aFile
)
or
aFile
;
end
--
function
VUHDO_decompressIfCompressed
(
aFile
)
return
"string"
==
type
(
aFile
)
and
VUHDO_deserializeTable
(
aFile
)
or
aFile
;
--
return "string" == type(aFile) and VUHDO_deserializeTable(VUHDO_decompressStringHuffman(aFile)) or aFile;
--
return "string" == type(aFile) and VUHDO_deserializeTable(aFile) or aFile;
return
"string"
==
type
(
aFile
)
and
VUHDO_deserializeTable
(
VUHDO_decompressStringHuffman
(
aFile
))
or
aFile
;
end
--
function
VUHDO_decompressOrCopy
(
aFile
)
return
"string"
==
type
(
aFile
)
and
VUHDO_deserializeTable
(
aFile
)
or
VUHDO_deepCopyTable
(
aFile
);
--
return "string" == type(aFile) and VUHDO_deserializeTable(VUHDO_decompressStringHuffman(aFile)) or VUHDO_deepCopyTable(aFile);
--
return "string" == type(aFile) and VUHDO_deserializeTable(aFile) or VUHDO_deepCopyTable(aFile);
return
"string"
==
type
(
aFile
)
and
VUHDO_deserializeTable
(
VUHDO_decompressStringHuffman
(
aFile
))
or
VUHDO_deepCopyTable
(
aFile
);
end
...
...
@@ -744,8 +758,8 @@ end
--
function
VUHDO_compressAndPackTable
(
aTable
)
return
type
(
aTable
)
==
"table"
and
VUHDO_serializeTable
(
aTable
)
or
aTable
;
--
return type(aTable) == "table" and VUHDO_compressStringHuffman(VUHDO_serializeTable(aTable)) or aTable;
--
return type(aTable) == "table" and VUHDO_serializeTable(aTable) or aTable;
return
type
(
aTable
)
==
"table"
and
VUHDO_compressStringHuffman
(
VUHDO_serializeTable
(
aTable
))
or
aTable
;
end
...
...
This diff is collapsed.
Click to expand it.
changelog.txt
View file @
8f9a82f3
...
...
@@ -27,6 +27,7 @@ Improvements:
-- return ("Ivaria" == anInfo["name"])
-- Added option to hide buff watch while out of combat
-- Under 'VuhDo Options > Buffs > General'
-- Added Huffman compression for profile sharing and storage
--------------------------------------------------------------
...
...
This diff is collapsed.
Click to expand it.
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment