Category Archives: PHP

Computer Algorithms: Data Compression with Diagram Encoding and Pattern Substitution

Overview Two variants of run-length encoding are the diagram encoding and the pattern substitution algorithms. The diagram encoding is actually a very simple algorithm. Unlike run-length encoding, where the input stream must consists of many repeating elements, as “aaaaaaaa” for … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , | Leave a comment

Computer Algorithms: Data Compression with Bitmaps

Overview In my previous post we saw how to compress data consisting of very long runs of repeating elements. This type of compression is known as “run-length encoding” and can be very handy when transferring data with no loss. The … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , , | Leave a comment

Computer Algorithms: Data Compression with Run-length Encoding

Introduction No matter how fast today’s computers and networks are, the users will constantly need faster and faster services. To reduce the volume of the transferred data we usually use some sort of compression. That is why this computer sciences … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , , , , , , , , | 1 Comment

PHP Performance: Bitwise Division

Recently I wrote about binary search and then I said that in some languages, like PHP, bitwise division by two is not faster than the typical “/” operator. However I decided to make some experiments and here are the results. … Continue reading

Posted in PHP, web development | Tagged , , , , , , | 1 Comment

Computer Algorithms: Interpolation Search

Overview I wrote about binary search in my previous post, which is indeed one very fast searching algorithm, but in some cases we can achieve even faster results. Such an algorithm is the “interpolation search” – perhaps the most interesting … Continue reading

Posted in algorithms, PHP | Tagged , , , , , , , , , , , , , , , | 2 Comments