Solving CSS-Sprite Packing Problem Using a Transformation to the Probabilistic Non-oriented Bin Packing Problem

  • Soumaya Sassi Mahfoudh
  • Monia Bellalouna
  • Leila Horchani
Conference paper
Part of the Lecture Notes in Computer Science book series (LNCS, volume 10861)


CSS-Sprite is a technique of regrouping small images of a web page, called tiles, into images called sprites in order to reduce network transfer time. CSS-sprite packing problem is considered as an optimization problem. We approach it as a probabilistic non-oriented two-dimensional bin packing problem (2PBPP|R). Our main contribution is to allow tiles rotation while packing them in sprites. An experimental study evaluated our solution, which outperforms current solutions.


Bin packing Non-oriented CSS-sprite Image compression 



The first author extends her sincere thanks to Seifeddine Kaoeuch for his help.


  1. 1.
    Fast rollovers without preload. Accessed 29 September 2017
  2. 2.
    A thousand ways to pack the bin - a practical approach to two-dimensional rectangle bin packing. Accessed 10 July 2017
  3. 3.
    Alakuijala, J., Vandevenne, L.: Data compression using Zopfli.Google inc. (2013). Accessed 08 January 2017
  4. 4.
    Baker, B., Coffman, E., Rivest, R.: Orthogonal packing in two dimensions. SIAM J. Comput. 9(4), 846–855 (1980)MathSciNetCrossRefGoogle Scholar
  5. 5.
    Bellalouna, M.: Problèmes d’optimisation combinatoires probabilistes. Ph.D. thesis, Ecole Nationale des Ponts et Chaussees (1993)Google Scholar
  6. 6.
    Chazelle, B.: The bottom-left bin-packing heuristic: an efficient implementation. IEEE Trans. Comput. 32(8), 697–707 (1983)CrossRefGoogle Scholar
  7. 7.
    Chen, P.H., Chen, Y., Goel, M., Mang, F.: Approximation of two-dimensional rectangle packing. Technical report (1999)Google Scholar
  8. 8.
    Chen, T.C., Chang, Y.W.: Modern floorplanning based on b*-tree and fast simulated annealing. Trans. Comp.-Aided Des. Integr. Circ. Sys. 25, 637–650 (2006)MathSciNetCrossRefGoogle Scholar
  9. 9.
    El Hayek, J., Moukrim, A., Nègre, S.: New resolution algorithm and pretreatments for the two-dimensional bin-packing problem. Comput. Oper. Res, 35(10), 3184–3201 (2008)CrossRefGoogle Scholar
  10. 10.
    Framework, N.: Rectangle packing. Accessed 25 January 2018
  11. 11.
    Gordon, J.: Binary tree bin packing algorithm. Accessed 08 September 2017
  12. 12.
    Habib, A., Rahman, M.S.: Balancing decoding speed and memory usage for Huffman codes using quaternary tree. Appl. Inform. 4(1), 39–55 (2017)CrossRefGoogle Scholar
  13. 13.
    Huang, E., Korf, R.: Optimal rectangle packing: an absolute placement approach. J. Artif. Intell. Res. 46, 47–87 (2013)MathSciNetzbMATHGoogle Scholar
  14. 14.
    Jaillet, P.: A priori solution of a traveling salesman problem in which a random subset of the customers are visited. Oper. Res. 36(6), 929–936 (1988)MathSciNetCrossRefGoogle Scholar
  15. 15.
    Jaillet, P.: Analysis of probabilistic combinatorial optimization problems in euclidean spaces. Math. Oper. Res. 18(1), 51–70 (1993)MathSciNetCrossRefGoogle Scholar
  16. 16.
    Jeon, M., Kim, Y., Hwang, J., Lee, J., Seo, E.: Workload characterization and performance implications of large-scale blog servers. ACM Trans. Web (TWEB) 6, 16 (2012)Google Scholar
  17. 17.
    Korf, R.: Optimal rectangle packing: new results. In. Proceedings of the Thirteenth International Conference on Automated Planning and Scheduling, ICAPS 2004, pp. 142–149 (2004)Google Scholar
  18. 18.
    Lodi, A.: Algorithms for two-dimensional bin packing and assignment problems. Ph.D. thesis, Université de bologne (1999)Google Scholar
  19. 19.
    Lodi, A., Martello, S., Vigo, D.: Recent advances on two-dimensional bin packing problems. Discret. Appl. Math. 123(1–3), 379–396 (2002)MathSciNetCrossRefGoogle Scholar
  20. 20.
    Marszalkowski, J., Mizgajski, J., Mokwa, D., Drozdowski, M.: Analysis and solution of CSS-sprite packing problem. ACM Trans. Web (TWEB) 10(1), 283–294 (2015)Google Scholar
  21. 21.
    Murata, H., Fujiyoshi, K., Nakatake, S., Kajitani, Y.: Rectangle-packing-based module placement. In: Kuehlmann, A. (ed.) The Best of ICCAD, pp. 535–548. Springer, Boston (2003). Scholar
  22. 22.
    Rehman, M., Sharif, M., Raza, M.: Image compression: a survey. Res. J. Appl. Sci. Eng. Technol. 7(4), 656–672 (2014)Google Scholar
  23. 23.
    Shea, D.: CSS sprites: image slicings kiss of death. A List Apart (2013)Google Scholar
  24. 24.
    Stefanov, S.: Image optimization, part 3 : four steps to file size reduction. Accessed 29 Jan 2017
  25. 25.
    Taubman, D., Marcellin, M.: JPEG2000 Image Compression Fundamentals, Standards and Practice: Image Compression Fundamentals, Standards and Practice, vol. 642. Springer Science & Business Media, Boston (2012). Scholar
  26. 26.
    Velho, P., Schnorr, M., Casanova, H., Legrand, A.: On the validity of flow-level TCP network models for grid and cloud simulations. ACM Trans. Model. Comput. Simul. (TOMACS) 23, 23 (2013)MathSciNetCrossRefGoogle Scholar
  27. 27.
    Wium Lie, H., Bos, B.: Cascading style sheets. World Wide Web J. 2, 75–123 (1997)Google Scholar

Copyright information

© Springer International Publishing AG, part of Springer Nature 2018

Authors and Affiliations

  1. 1.Laboratory CRISTAL-GRIFT, National School of Computer ScienceUniversity of ManoubaManoubaTunisia

Personalised recommendations