Click here to Skip to main content
15,900,907 members
Home / Discussions / C#
   

C#

 
GeneralRe: Compress specific text for storage. Pin
Luc Pattyn26-Aug-10 11:48
sitebuilderLuc Pattyn26-Aug-10 11:48 
GeneralRe: Compress specific text for storage. Pin
AspDotNetDev26-Aug-10 11:51
protectorAspDotNetDev26-Aug-10 11:51 
GeneralRe: Compress specific text for storage. Pin
Ian Shlasko26-Aug-10 11:53
Ian Shlasko26-Aug-10 11:53 
GeneralRe: Compress specific text for storage. Pin
AspDotNetDev26-Aug-10 12:02
protectorAspDotNetDev26-Aug-10 12:02 
GeneralRe: Compress specific text for storage. Pin
Ian Shlasko26-Aug-10 12:10
Ian Shlasko26-Aug-10 12:10 
GeneralRe: Compress specific text for storage. Pin
AspDotNetDev26-Aug-10 11:48
protectorAspDotNetDev26-Aug-10 11:48 
GeneralRe: Compress specific text for storage. Pin
Luc Pattyn26-Aug-10 12:13
sitebuilderLuc Pattyn26-Aug-10 12:13 
AnswerRe: Compress specific text for storage. Pin
AspDotNetDev26-Aug-10 10:20
protectorAspDotNetDev26-Aug-10 10:20 
That depends on the subset of puzzles you are storing. Some puzzle combinations will be more compressible than other combinations. For example, a checker board that is setup before the game starts will be very compressible using RLE compression (run-length encoding), as most adjacent squares will have the same value (red, black, empty). Also, if there are common configurations between puzzle sets (e.g., two puzzles have half their board setup the same), then you can use referential compression (i.e., one row would point to another row and that other row would indicate part of the game board's setup and the main row would indicate the rest of the setup). The trick with that form of compression is to not overdo it, because the key you use to point to the other row takes up space too. You can also separate the boards into different tables to take off a few bits. So, you could have Table_1, Table_2, Table_3, ..., Table_256. The table the data resides in represents the first few bits of data. So if you have 256 tables, you can shave off 8 bits (aka, a byte) from the data. But that doesn't make sense for all scenarios. And if you can store several boards together, that might offer further opportunities for compression. For example, if two boards are very similar, you can take the difference between them and compress that (such as with RLE compression) rather than both boards. That way, you only need one of the boards and the uncompressed difference to recreate the other board. That will only work if the distribution of game boards is optimal (i.e., if there are lots of groups of boards where they are very similar). This technique is used in video encoding. A diff is taken between a two frames and that along with one frame is stored rather than storing both frames. You can chain them so you store, say, 99 diffs and one full frame to recreate all 100 frames. The problem with that is that you must process 99 frames until you get to that 100th frame. That wouldn't be a problem if you actually want to do some processing on each frame (or, in your case, each board).

QuestionWhere is saved connection string for DataSet Pin
polzovat7926-Aug-10 5:16
polzovat7926-Aug-10 5:16 
AnswerRe: Where is saved connection string for DataSet Pin
Łukasz Nowakowski26-Aug-10 5:30
Łukasz Nowakowski26-Aug-10 5:30 
GeneralRe: Where is saved connection string for DataSet Pin
darkelv26-Aug-10 19:09
darkelv26-Aug-10 19:09 
AnswerRe: Where is saved connection string for DataSet Pin
Not Active26-Aug-10 6:37
mentorNot Active26-Aug-10 6:37 
AnswerRe: Where is saved connection string for DataSet Pin
darkelv26-Aug-10 19:12
darkelv26-Aug-10 19:12 
Questionschedule in program Pin
behzadcp26-Aug-10 3:01
professionalbehzadcp26-Aug-10 3:01 
AnswerRe: schedule in program Pin
Ian Shlasko26-Aug-10 3:08
Ian Shlasko26-Aug-10 3:08 
GeneralRe: schedule in program Pin
behzadcp26-Aug-10 21:06
professionalbehzadcp26-Aug-10 21:06 
GeneralRe: schedule in program Pin
Ian Shlasko27-Aug-10 1:34
Ian Shlasko27-Aug-10 1:34 
Questionhow to #define a global one Pin
Joe Rozario26-Aug-10 1:45
Joe Rozario26-Aug-10 1:45 
AnswerRe: how to #define a global one Pin
Richard MacCutchan26-Aug-10 2:01
mveRichard MacCutchan26-Aug-10 2:01 
GeneralRe: how to #define a global one Pin
Joe Rozario26-Aug-10 17:59
Joe Rozario26-Aug-10 17:59 
QuestionWindows 7: Winform application report error when try to invoke the COM object Pin
Cracked-Down26-Aug-10 1:16
Cracked-Down26-Aug-10 1:16 
AnswerRe: Windows 7: Winform application report error when try to invoke the COM object Pin
Pete O'Hanlon26-Aug-10 1:21
mvePete O'Hanlon26-Aug-10 1:21 
AnswerRe: Windows 7: Winform application report error when try to invoke the COM object Pin
Luc Pattyn26-Aug-10 2:28
sitebuilderLuc Pattyn26-Aug-10 2:28 
GeneralRe: Windows 7: Winform application report error when try to invoke the COM object Pin
Cracked-Down26-Aug-10 2:39
Cracked-Down26-Aug-10 2:39 
QuestionHow to read package object programatically in MS word 2007 (docx file) using c# Pin
Akash Agarwal26-Aug-10 0:09
Akash Agarwal26-Aug-10 0:09 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.